Forum: Ruby on Rails to understand the flow of application in ror

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
tanmay (Guest)
on 2008-10-12 02:40
(Received via mailing list)
hi every one i am new in this platform and seeking for help . i have
created a small application  which runs quite well but actually i dont
know how it flows when and where the method calls itself.

i know every request handeled by controller  ,i have read agile web
development and started to build a shopping cart

i know that when i go to browser and provide link to my
controller(product) then it calls index page then i have clicked on
new link  then controller goes to new action .now i get the form to
fill my description .now when i click the create button then how it
works and how the flow goes everywhere ,how the controller calls the
different actions  from here i  am not getting.

when i  see the source code on browser then i get/products in form
action  so where it goes iam not getting so please reply me.

yachtman (Guest)
on 2008-10-12 20:50
(Received via mailing list)
If I understand your question correctly...

Routing seems to be the core of you are asking. In the case of the
form, when you click 'submit', it's a POST action, which when combined
with your controller will be directed to the 'create' action. When you
first asked for the form 'edit' or 'new', then the request is
controlled by either the 'edit' or 'new' actions of of your
controller. To see the routes based on the actions do a:

# rake routes
Philipe Farias (Guest)
on 2008-10-13 17:15
(Received via mailing list)
Read about Routes. If you're using Rails 2 then you shoud know
something about REST too.
And this is an excelent guide to understand routing in Rails:
This topic is locked and can not be replied to.