Hi I have created a rails app with my own ERD based on the rolling with
rails tut.
I have c:\ruby and c:\rails\myapp. According to the tut I should have
all my generated .rhtml files under …myapp\views\abc.rhtml etc, but I
have none whatsoever.
I have years of dev experience, but am sad to say flumoxed at this
point.
Hi Chris, I generated the models and controllers and then manually added
the scaffold code to the relevant controller. The app works fine now
(well once I got used to the plurals way of rails ) and all the
relevant views folders are there, just not the .rhtml pages.
Hi Chris, I generated the models and controllers and then manually added
the scaffold code to the relevant controller. The app works fine now
(well once I got used to the plurals way of rails ) and all the
relevant views folders are there, just not the .rhtml pages.
You need to create them yourself, or actually generate the scaffold.
if in your controller you have:
class Foo < ApplicationController
def index @foos = Foo.find(:all)
end
end
Then you need to create a view in:
your_app/app/views/foo/index.rhtml
Or alternatively, you can run the scaffold generator which writes out
the controller code and rhtml templates so you can start messing with
them.