Views
Location
The view files are located in the app/views
directory.
Rendering
Eucalypt looks for view files relative to the app/views
directory by default (though you can change this in the core application file).
Views directly inside directory
If your views
folder structure is like the following:
Then you can render the pages index.erb
and 404.erb
in the following way:
app/controllers/main_controller.rb
Views inside sub-directories
If your views
folder structure is like the following (with some views located within sub-directories):
Then you can render the pages index.erb
and 404.erb
in the following way (note the specification of the full path relative to app/views
for rendering the index
page):
app/controllers/main_controller.rb
Last updated