Rajinder Yadav wrote:
I've added the following to routes.rb

map.resource :login

if I do a rake routes I see

ya...@energy64x2 $ rake routes
(in /home/yadav/dev/rails/upload)
new_login GET /login/new(.:format) {:controller=>"logins", :action=>"new"} edit_login GET /login/edit(.:format) {:controller=>"logins", :action=>"edit"} login GET /login(.:format) {:controller=>"logins", :action=>"show"} PUT /login(.:format) {:controller=>"logins", :action=>"update"} DELETE /login(.:format) {:controller=>"logins", :action=>"destroy"} POST /login(.:format) {:controller=>"logins", :action=>"create"}

However my login form break when I use

<% form_tag login_path do %>

I am forced to use

<% form_tag '/login/create' do %>

otherwise I get the following error

NameError in LoginsController#create
uninitialized constant LoginsController

I realized my error, I created the login controller as a singular, so rails got tripped up. It's working now.

Kind Regards,
Rajinder Yadav

--
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.

Reply via email to