Hey guys, I have two controllers, X and Y:
In X, I have a :before_filter for a private method, foo.
I also have the following statement at the top of controller X.
helper_method :foo
In controller Y, I have a :before_filter for a private method, bar. In bar, I call foo. But apparently this is not allowed as I get an undefined local variable or method error. I would think that my :helper_method declaration should allow foo to be used in other controllers.
Generally, speaking, how can I achieve calling foo in controller Y? Is there a way while still keeping foo private? If not, how is achieved (while adhering to good design principles) if foo is not private?
Thanks!