Either that, or (not recommended really) you can enable the catch all route in 
routes.rb by uncommenting the line towards the bottom that looks like:

match ':controller(/:action(/:id(.:format)))' 

but read the line above that, which tells you that if you do that, you'll 
enable access to all actions in all controllers; probably not what you want to 
do. 
On Sep 10, 2010, at 2:04 PM, Mauro wrote:

> On 10 September 2010 15:40, Sandy <[email protected]> wrote:
>> 
>>  My routes.rb has  resources :rusers.
>>  Try putting the following line into routes.rb:
>>  map.connect 'user/logout', :controller => 'user', :action => 'logout'

This would be correct if you were on rails 2, but according to your earlier 
post, you said you've got resources :rusers, which would only work in rails3, I 
think. So, to add the custom route, do this:

match '/rusers/logout' :to=>'rusers#logout' 

Go here and do some reading:

http://edgeguides.rubyonrails.org/routing.html

That should give you plenty to chew on and at least make the simple routing 
stuff clear. 

Hope that helps you. 
> 
> But....I have to set a route for every custom action that I add to controller?
> 
> -- 
> 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.
> 

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