The 14/03/12, tydeas wrote:
> Hello there,
> I am new to the rails framework. I have seen that rails uses the
> "Convention over configuration" philosophy.
> Then when I create a controller "post_controller" I have to actually
> configure it in the routes.rb file to get it working. Is this the
> other way around, configuration over convention?
> I would expect that if the controller exist all his actions are
> available to be executed, and more to go actions for crud would accept
> the "conventional" method and have names like create, delete etc...
> What do you think? Correct me if I am wrong in something.

Convention is done the reverse way. Requesting for users/new will
execute method new of class UsersController in
controllers/user_controller.rb. All this naming is conventionnal.

BTW, I wouldn't expect to have routes automagically relying on
controllers because controllers often doesn't have routes attached.

-- 
Nicolas Sebrecht

-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to