- Removes the
Rails.envcheck in theTaggablemodule.- This was a holdover from a previous project and shouldn't have been included here. We have
Penman.enableandPenman.disablefor this stuff.
- This was a holdover from a previous project and shouldn't have been included here. We have
- Major change
- Adds support for custom seed file formatting via an
.erb.file. RecordTagis now wrapped in thePenmanmodule.seed_method_nameconfig setting has been removed as the erb solution is better.- add proper versioning
- pull request
- Adds
Penman.enabled? - Adds configuration for the
file_name_formattermethod, allowing users to format their file names as they see fit. - Removes
Penman.seed_pathandPenman.default_candidate_keyas these can be easily accessed throughPenman.config.* - pull request
- Fix bug for a case where a relation is defined between two models where the foreign key is not the primary key.
- Thanks to @jayvan for this fix.
- pull request
- Adds back a check printed in the seeds files that allow the seeds to be safely run in environments where they were generated.
- pull request
- Fix issue 5
- Generate the seed order tree at seed generation time, not when the models are loaded. The issue was caused when the
include Taggableline in the model was above anybelongs_to:association. When the module is included the model is registered and ordered via a tree with RecordTags. If thebelongs_torelation isn't setup yet, this ordering can be incorrect. By generating the seed order at seed generation time, we allow the models time to be fully setup before evaluating their relations. - pull request
- Adds the
after_generateconfigurable callback that is to be used to add generated seeds to a migrations table of the user's choice. - pull request
- Adds an optional record validity check prior to seeds.
- pull request
- Encode strings with
.inspect, allowing for special characters in the strings to be escaped. - pull request
- relax rails constraint, allowing rails 5 apps to use the gem
- direct users to put the configuration in initializers
- pull request (thanks @nearlyfreeapps)
- Add functionality for generating seeds only for specific models (thanks @lyrebird)
- pull request