I am trying to generate devise sign_in form, from the different controller/views( which is called 'mains_controller' in my case)
I asked a question on stackoverflow.com but did not get the satisfiable answer. You can read the specific question in there. http://stackoverflow.com/questions/4081744/devise-form-within-a-different-controller I am stuck with the 'build_resource' from devise. The session_controller which takes care of sign_in/sign_out has a method call called 'build_resource.' It seems that build_resource creates a adequate value for 'resource' and 'resource_name' for sign_in form. <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> But thats the case in devise related controllers. If i put 'build_resource' line with in my own 'mains_controller' it throws out error saying that there is no such method like 'build_resource.' How can I resolve this problem? If I create a form inline ruby code, it seems that <% if devise_mapping.rememberable? -%> <p><%= f.check_box :remember_me %> <%= f.label :remember_me %></p> <% end -%> 'devise_mapping' part above does not work. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

