I don’t know if this is a JRuby specific issue, or just a general issue
with
Rails.
I have 2 controllers, say, “A”, and “B”. Associated with this, then, are
2
views, as well as 2 helpers.
Is it possible to have a helper method in a_helper.rb and in
b_helper.rb? A
little more specifically, I have a helper method to display a chart
drawn
with JFreeChart; the helper method really just turns around and invokes
a
method on the controller. The implementation of the methods is a little
bit
different (given different controllers), but the intent was the same, so
I
named the helper method the same in both helpers. I would have thought
that,
while the “A” view was being rendered, only the “A” helper was
available,
but the error message I’m getting indicates that the helper from “B” is
being invoked (I can easily tell because the B helper takes a parameter
while the A helper does not).
I’ve done some digging on the web, and found some indication of helpers
sharing a namespace, but nothing specifically addressing this issue.
Thanks!
j