It is not that for every screen you've to create a model rather the reverse. Every model for which you need interfaces you'll create views.
Why don't you start with this guide and move ahead understanding the basics.
Other than CRUD interfaces? You can add a view file directly to the view folder of the controller this model is associated with. For example, if the model is post.rb in app/models
and it has a corresponding controller posts_controller.rb
in app/controllers
and it has corresponding views in app/views/posts
then you can add your view to app/views/posts
folder with a corresponding method in the controller which will render that view provided there is a route for that in the config/routes.rb
file.
Say I want to add a landing_page.html.erb
view to Post. I would add a method in posts_controller.rb
(although, this is not mandatory. But, might be useful for you to check some conditions before rendering the view):
class posts_controller < ApplicationController
...
def landing_page
end
end
Add a view in app/views/posts directory:
# app/views/posts/landing_page.html.erb
Add a route to the config/routes.rb file:
map.resources do
member do
get :landing_page
end
end
Now, you can access the page at http://localhost:3000/posts/:id/landing_page
.