# Rails plugin generator

**URL:** <https://meta.discourse.org/t/rails-plugin-generator/95907>\
**Category:** Announcements\
**Created:** [29 באוגוסט,‏ 2018,‏ 11:43am UTC](https://meta.discourse.org/t/rails-plugin-generator/95907 "2018-08-29T11:43:01Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)\
**Post date:** [31 באוגוסט,‏ 2018,‏ 2:01pm UTC](https://meta.discourse.org/t/rails-plugin-generator/95907/20 "2018-08-31T14:01:25Z")

</div>

> [@joebuhlig](#):
>
> custom routes shouldn’t be allowed just because the plugin is installed

The ‘built-in’ method for this is to use `requires_plugin` in the plugin controller. I agree that this isn’t used as much as it should be though, even in official plugins. (Example [here](https://github.com/discourse/discourse/blob/a71fe16647c69db57aa47a40f94a3eb82176b79b/plugins/poll/plugin.rb#L211), defined [here](https://github.com/discourse/discourse/blob/2d961601922bb98cca90a0d5c9f25cd00f0fc333/app/controllers/application_controller.rb#L266))

---

_[View the full topic](https://meta.discourse.org/t/rails-plugin-generator/95907)._
