Using multiple controllers in one view in Rails

前端 未结 3 701
抹茶落季
抹茶落季 2020-12-28 23:29

I\'m working on something like a social networking mesh; I am using different API\'s from various websites, e.g. Last.FM, Delicious, Twitter, ...

I\'ve created one c

3条回答
  •  春和景丽
    2020-12-28 23:48

    First off, you should put all of the data-storing and data-gathering methods into Resources and Models so they are accessible from all controllers. You can keep the internal data-mutating operations in your individual controllers though. Once you have it organized like this, you could do what Hobo does: create a controller just for the front page, "front_controller" if you will. Here you can display data gathered from all of your models and resources, as well as links to your other controller actions.

提交回复
热议问题