class FooController def index # The controller is responsible for gathering the things needed # to make the response. This should be a single line of code @things = Foo.things # The controller is responsible for sending the view back to the user. # the view uses our instance variable above to render @things render :some_view end end # in an ideal controller those are the only two things that the action does # 1. gathers the data # 2. renders the view # # ideally each of these things is 1 line of code, but it might end up being # more to deal with validation errors etc