ApplicationHelper in engine?

So if I understand things right, my Engine plug-in can have a helper in
it. And my app can provide a helper by the same name, and the two
helpers will be merged together, any conflicting method names my app’s
helper with the same name will take precedence.

Is there a reason this wouldn’t work for an ApplicationHelper in
application_helper.rb ?

My engine provides an ApplicationHelper. That works fine as long as the
app using it has no ApplicationHelper. But if the containing app does
have an ApplicationHelper, they are NOT merged together, but instead
only the containing app’s ApplicationHelper is used, everything in the
Engine’s ApplicationHelper is lost and unavailable.

Can anyone shed some light on this?


I know that this topic is very old, but the question asked still seems
to be the case. Anybody got more infos on this? I’m using Rails 3.2 and
created an engine using rails plugin new my_engine --full. Every
helper seems to be loaded into the application (whether they are in
their own namespace or not), but not the application_helper.rb file.
There has to be a reason for this. :wink:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs