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
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
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,
3 matches
Mail list logo