I cannot find out how to have my gem append a column to an existing model/table. My gem needs to check the created_at
attribute of a model, and based on time passed, set an active
column from true
to false
. I'm assuming that, upon install, it will end up needing a
$ rails {gem_name}:install
type call from the terminal to append the active column to the model's table. I don't think that an engine is the way to go because I'm not creating any models in the gem, and the only migration I need is to alter an existing model.
Any links, tutorials or advice will be greatly appreciated.