You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a generic way of inserting custom modules into Gobierto classes, so each plugin can add new behavior. Right now it's only used for HR/indicators/budgets plugins, but this would have been useful when we had to adapt Gobierto classes for gencat:
Create a generic Gobierto::Plugin < Rails::Railtie that declares the attach_module method, and loads gobierto models and js files. Then a plugin can inherit from this class, and to modify/add new methods to a class only has to call:
It's not a priority right now, but I think it's nice to keep this in mind.
Description
In the two
Railtie
plugins we've made so far we're staring to have a pattern:Proposed solution
Create a generic
Gobierto::Plugin < Rails::Railtie
that declares theattach_module
method, and loads gobierto models and js files. Then a plugin can inherit from this class, and to modify/add new methods to a class only has to call:The text was updated successfully, but these errors were encountered: