Sha256: a191d28c92114892033524176790471742371e915a500bdcd02373592033d6a1
Contents?: true
Size: 1.46 KB
Versions: 13
Compression:
Stored size: 1.46 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 is 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-initiatives", git: "https://github.com/example-github-organization/decidim-module-initiatives" ---- * Publishing it on rubygems.org You can learn more about xref:develop:modules.adoc[Modules] in the development guide.
Version data entries
13 entries across 13 versions & 1 rubygems