Created by: munza
add —module (-m) option for administrate generators that will create generated file under the specified module name. eg. rails g administrate:install -m Manage.
This will solve the problem if anyone already has a model named Admin
in their application and wish to use a different module name other than the default Admin
module of the Administrate.
We can now use the --module
(-m
as shorthand) and then specify the module name we wish to use in the generator command like below -
rails g administrate:install -m Manage
-
rails g administrate:dashboard Foo -m Manage
etc.
We can then see that the generated files are using the specified Manage
module instead of the default Admin
module namespacing.