[Rails] Help to understand scaffold's code!

2011-04-23 Thread amrit pal pathak
Follwed a Guide at http://guides.rubyonrails.org/getting_started.html.Generated a scafffold as rails generate scaffold Post name:string title:string content:text The content of app/view/posts/ index.html.erb file are as under h1Listing posts/h1 table

Re: [Rails] Help to understand scaffold's code!

2011-04-23 Thread rajeevsharma86
Look at the code on posts_controller.rb index method On Sat, Apr 23, 2011 at 12:10 PM, amrit pal pathak amritpalpath...@gmail.com wrote: Follwed a Guide at http://guides.rubyonrails.org/getting_started.html.Generated a scafffold as rails generate scaffold Post name:string title:string

Re: [Rails] Help to understand scaffold's code!

2011-04-23 Thread News Aanad
See in app/controller/post_controller.rb file in that there is a code for index in *def index* . . . *end* when you make any request above function will call first and then goes to index.html.erb file. Now you can explore more things by tracing the code. On Sat, Apr 23, 2011 at 12:16 PM,