Closed zedtux closed 6 years ago
Nobody asked for that feature.
I'm not sure what nobrainer:install should do for a Rails engine. Here's what it does currently: https://github.com/nviennot/nobrainer/blob/master/lib/rails/generators/nobrainer/install_generator.rb#L26-L51
It comments out any ActiveRecord line in most configuration files, and copy the default settings https://github.com/nviennot/nobrainer/blob/master/lib/rails/generators/templates/nobrainer.rb over in the config/initializer directory. For a rails engine, I don't think any of this make sense.
btw, for theadmin area, the systems models can be helpful to introspect the database (http://nobrainer.io/docs/db_management/#accessing_system_tables) I'm seeing that the Users and Permissions table is missing. Let me know if you need it.
Thank you @nviennot for your quick and nice answer.
Actually I was expecting to only create the Nobrainer initializer but then I was remembering the documentation showing an example of initializer, so copying and pasting it should be enough.
Ideally you could write a line in the doc to tell about it for engines.
BTW there is typo in http://nobrainer.io/docs/persistence/ NoBrainer performs the following stpes:
should be NoBrainer performs the following steps:
(last word).
And thank you for your link to the system tables 👍
I'm working on a Rails engine which will have an administration area allowing users to see the data and work with it. I need a document oriented database so as I always wanted to use RethinkDB I'm going for it this time.
So I built my Rails engine which will save a lot of data from the users. I have added the nobrainer gem to the gemspec file and now I'm trying to run the
rails g nobrainer:install
command but it fails with the following:The generator is looking for the
config/application.rb
file which isn't available at that position in the engine. I have dummy application (living onfeatures/dummy
) which could get the modifications.So did you work on any compatibility with Rails engines or is it something nobody asked before?