docs/modules/customize/pages/code.adoc in decidim-0.24.3 vs docs/modules/customize/pages/code.adoc in decidim-0.25.0.rc1
- old
+ new
@@ -10,10 +10,13 @@
[source,console]
----
decidim DecidimBarcelona
----
-If you want to override/change anything (for instance the homepage), you can just do it with the same name of the file, through Monkey Patching.
+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 prefered 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 through 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: