MrDys / blacklight

Blacklight Plugin
http://projectblacklight.org/
Other
1 stars 1 forks source link

Helper methods provided by Blacklight should be easily overriden by local implementations #539

Closed MrDys closed 12 years ago

MrDys commented 12 years ago

CODEBASE-364: From http://groups.google.com/group/rubyonrails-core/browse_thread/thread/3da0012435e7c72a

I want to let the local application selective over-ride helper methods from AdvancedHelper in the engine (and ideally be able to call 'super'). That's a pretty reasonable thing to want to allow, right, a perfectly reasonable (and I'd think common) design? Problem is I can't get it to work. Let's say there's a method

do_something in the engine's app/helpers/advanced_helper.rb.

MrDys commented 12 years ago

Original reporter: jrochkind

MrDys commented 12 years ago

cbeer: Fixed in https://github.com/projectblacklight/blacklight/commit/2f205df335f2cc816aa2b03d48b18055bb7b81c7

MrDys commented 12 years ago

cbeer: This is an older issue that I thought was addressed earlier -- at least my local applications were working ok, but apparently that may have been a fluke.

We intend to address this as follows:

app/helpers/catalog_helper.rb:

module CatalogHelper include Blacklight::CatalogHelperBehavior # it'll get this from the plugin, great

and now we can individually over-ride whatever methods

from Blacklight::CatalogHelperBehavior we want, and not the others.

end