Displaying 1 result from an estimated 1 matches for "article_most_discussed".
2006 Apr 04
1
Calling a method in another controller
..., and display it on the homepage. I will also have some
specific homepage modules being displayed on the page.
I am trying to do something like this :
require ''content''
class HomepageController < ApplicationController
def list
@blog_contents = BlogController.list
@article_most_discussed = ArticleController.list
etc...
end
end
But it does not seem to work. How do I reference methods in other
controllers ? Is it done ? I can replicate the code in this controller,
but that will be messy.
Thanks in advance.
Hamza
--
Posted via http://www.ruby-forum.com/.