Sha256: 5500a02ec1767aa5d6d78e9416df8e557d3b3af7050852c9976a86243f2ef86f
Contents?: true
Size: 1.44 KB
Versions: 12
Compression:
Stored size: 1.44 KB
Contents
= Code If you want to override/change anything, you can just do it with the same name of the file, through Monkey Patching. Some real world examples of this method: * https://github.com/gencat/participa/blob/master/app/decorators/decidim/admin/selective_newsletter_form_decorator.rb[Decidim::Admin::SelectiveNewsletterForm]. As it's a decorator you also need to make it available in the https://github.com/gencat/participa/blob/3416992ae095f6ab1e826fee961253514c4ff0ef/config/application.rb#L48[application config] * https://github.com/barcelonaregional/decidim-premet25/blob/master/config/initializers/etiquette_validator.rb[EtiquetteValidator.class_eval] If you want to extend Decidim, the preferred way should be by having a Module. This is a Ruby on Rails Engine which provides ruby code (models, views, controllers, assets, etc). You can use it in multiple ways: * Putting it on the same directory as your app and pointing on the Gemfile. https://github.com/AjuntamentdeBarcelona/decidim-barcelona/tree/c210b5338d7ba1338c9879627e081da1441f1946[See example on GitHub]. For instance: [source,ruby] ---- gem "decidim-debates", path: "decidim-debates" ---- * Publishing on a git repository and pointing in on the Gemfile. For instance: [source,ruby] ---- gem "decidim-consultations", git: "https://github.com/decidim/decidim-module-consultations" ---- * Publishing it on rubygems.org You can learn more about xref:develop:modules.adoc[Modules] in the development guide.
Version data entries
12 entries across 12 versions & 1 rubygems