Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6156519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:37:25+00:00 2026-05-23T20:37:25+00:00

Preface: I’m not sure what resources are. I need this form (which is working

  • 0

Preface: I’m not sure what resources are.

I need this form (which is working from the user/sign_up route) to work on my ‘offline page’–so users can still register when my app is down. My application_controller calls a :filter_before, :except => [:offline] and my registrations_controller has a :skip_filter_before action. (Is it called an action?)

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
  <%= devise_error_messages! %>

  <p><%= f.label :email %><br />
  <%= f.email_field :email %></p>
  <p><%= f.submit "Sign up" %></p>
<% end %>

My Registration_controller:

class RegistrationsController < Devise::RegistrationsController
  before_filter :get_teams
  skip_filter :require_online
  def create
    build_resource

    if resource.save
      if resource.active_for_authentication?
        set_flash_message :notice, :signed_up if is_navigational_format?
        respond_with resource, :location => redirect_location(resource_name, resource)
      else
        set_flash_message :notice, :inactive_signed_up, :reason => resource.inactive_message.to_s if is_navigational_format?
        expire_session_data_after_sign_in!
        respond_with resource, :location => after_inactive_sign_up_path_for(resource)
      end
    else
      clean_up_passwords(resource)
      respond_with_navigational(resource) { render_with_scope :new }
    end
  end
  ...
end

Routes:

         confirm_account        /confirm_account(.:format)                {:controller=>"confirmations", :action=>"confirm_account"}
                 sign_up        /sign_up(.:format)                        {:action=>"sign_up", :controller=>"user/sign_up"}
        new_user_session GET    /user/sign_in(.:format)                   {:action=>"new", :controller=>"devise/sessions"}
            user_session POST   /user/sign_in(.:format)                   {:action=>"create", :controller=>"devise/sessions"}
    destroy_user_session GET    /user/sign_out(.:format)                  {:action=>"destroy", :controller=>"devise/sessions"}
           user_password POST   /user/password(.:format)                  {:action=>"create", :controller=>"devise/passwords"}
       new_user_password GET    /user/password/new(.:format)              {:action=>"new", :controller=>"devise/passwords"}
      edit_user_password GET    /user/password/edit(.:format)             {:action=>"edit", :controller=>"devise/passwords"}
                         PUT    /user/password(.:format)                  {:action=>"update", :controller=>"devise/passwords"}
cancel_user_registration GET    /user/cancel(.:format)                    {:action=>"cancel", :controller=>"registrations"}
       user_registration POST   /user(.:format)                           {:action=>"create", :controller=>"registrations"}
   new_user_registration GET    /user/sign_up(.:format)                   {:action=>"new", :controller=>"registrations"}
  edit_user_registration GET    /user/edit(.:format)                      {:action=>"edit", :controller=>"registrations"}
                         PUT    /user(.:format)                           {:action=>"update", :controller=>"registrations"}
                         DELETE /user(.:format)                           {:action=>"destroy", :controller=>"registrations"}
       user_confirmation POST   /user/confirmation(.:format)              {:action=>"create", :controller=>"confirmations"}
   new_user_confirmation GET    /user/confirmation/new(.:format)          {:action=>"new", :controller=>"confirmations"}
                         GET    /user/confirmation(.:format)              {:action=>"show", :controller=>"confirmations"}
             user_unlock POST   /user/unlock(.:format)                    {:action=>"create", :controller=>"devise/unlocks"}
         new_user_unlock GET    /user/unlock/new(.:format)                {:action=>"new", :controller=>"devise/unlocks"}
                         GET    /user/unlock(.:format)                    {:action=>"show", :controller=>"devise/unlocks"}
        editreject_admin GET    /admin/:id/editreject(.:format)           {:action=>"editreject", :controller=>"admin"}
            reject_admin GET    /admin/:id/reject(.:format)               {:action=>"reject", :controller=>"admin"}
            accept_admin GET    /admin/:id/accept(.:format)               {:action=>"accept", :controller=>"admin"}
     entries_admin_index GET    /admin/entries(.:format)                  {:action=>"entries", :controller=>"admin"}
 preferences_admin_index GET    /admin/preferences(.:format)              {:action=>"preferences", :controller=>"admin"}
             admin_index GET    /admin(.:format)                          {:action=>"index", :controller=>"admin"}
           about_entries GET    /entries/about(.:format)                  {:action=>"about", :controller=>"entries"}
             all_entries GET    /entries/all(.:format)                    {:action=>"all", :controller=>"entries"}
       myentries_entries GET    /entries/myentries(.:format)              {:action=>"myentries", :controller=>"entries"}
              rate_entry GET    /entries/:id/rate(.:format)               {:action=>"rate", :controller=>"entries"}
            submit_entry PUT    /entries/:id/submit(.:format)             {:action=>"submit", :controller=>"entries"}
          entry_comments POST   /entries/:entry_id/comments(.:format)     {:action=>"create", :controller=>"comments"}
           entry_comment DELETE /entries/:entry_id/comments/:id(.:format) {:action=>"destroy", :controller=>"comments"}
                 entries GET    /entries(.:format)                        {:action=>"index", :controller=>"entries"}
                         POST   /entries(.:format)                        {:action=>"create", :controller=>"entries"}
               new_entry GET    /entries/new(.:format)                    {:action=>"new", :controller=>"entries"}
              edit_entry GET    /entries/:id/edit(.:format)               {:action=>"edit", :controller=>"entries"}
                   entry GET    /entries/:id(.:format)                    {:action=>"show", :controller=>"entries"}
                         PUT    /entries/:id(.:format)                    {:action=>"update", :controller=>"entries"}
                         DELETE /entries/:id(.:format)                    {:action=>"destroy", :controller=>"entries"}
                                /auth/:service/callback(.:format)         {:controller=>"services", :action=>"create"}
                services GET    /services(.:format)                       {:action=>"index", :controller=>"services"}
                         POST   /services(.:format)                       {:action=>"create", :controller=>"services"}
                    root        /(.:format)                               {:controller=>"entries", :action=>"index"}
               countdown        /countdown(.:format)                      {:controller=>"application", :action=>"countdown"}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:37:26+00:00Added an answer on May 23, 2026 at 8:37 pm

    The ‘resource’ in the case of Devise is what is actually being registered. In your case, it’s most likely a User. However, User isn’t hardcoded into Devise so that you can have multiple types of users, for example Admins or Editors. For the sake of simplicity in this case, when you read ‘resource’ think ‘user’.

    The rest of my answer isn’t really an answer, just a request for more details. I’ll edit this with a proper answer if I’m able to help 🙂

    As for your question, I’m not 100% sure I understand what it is you’re asking about. Are you trying to show the registration form on an offline page or trying to send the registration data to the offline page? In either case, are you receiving and error or such like preventing you from doing so? If you are, please post the error or details of the unexpected behaviour. Posting your routes.rb might also be helpful, depending on what your problem is.

    Just one other thing I’m not clear on, is the offline page part of your rails app or hosted elsewhere? If the app is down, it won’t be accessible.

    Update:

    So what I understand is you’re trying to put the user registration form on an offline page? If so, try this.

    In your controller:

    def offline
      @user = User.new
    end
    

    In your offline.html.erb view:

        <%= form_for(@user, :url => user_registration_path) do |f| %>
          <%= devise_error_messages! %>
    
          <p><%= f.label :email %><br />
          <%= f.email_field :email %></p>
          <p><%= f.submit "Sign up" %></p>
        <% end %>
    

    I don’t think you have a route set up for your offline action, so you’ll need to do that. For a quick and easy way, use something like this:

    match '/offline' => "welcome#offline"
    

    Where welcome is the name of the controller where your offline action is located.

    Does this help any?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I will preface this question by saying, I do not think it is solvable.
I'll preface this by saying that I usually work in C#/.Net. Normally, I use
I should preface this by saying I'm working on a pocket PC app and
To preface I am using Borland C++ and the VCL. I need some sort
Let me preface this question by saying I use TextMate on Mac OSX for
Let me preface this by saying I'm a complete amateur when it comes to
I have to preface this with the fact that I love jQuery as a
I'll preface this question by saying this is for a Microsoft only shop. If
Just to preface: I work in a small company that does ASP.NET development and
Let me preface by saying I am not knocking .Net (it helps me earn

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.