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
RAILS_ROOT: /home/yadav/dev/rails/upload
Application Trace | Framework Trace | Full Trace
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:443:in `load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:361:in `constantize' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:360:in `each' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:360:in `constantize' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/inflections.rb:162:in `constantize' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:443:in `recognize' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/routing/route_set.rb:436:in `call'


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