Download Latest Version 0.7.0_ New config syntax, custom scopes on associations, ... source code.tar.gz (23.0 kB)
Email in envelope

Get an email when there's a new version of Evil Seed

Home / v0.7.0
Name Modified Size InfoDownloads / Week
Parent folder
evil-seed-0.7.0.gem 2025-02-07 22.0 kB
SHA256SUM 2025-02-07 86 Bytes
0.7.0_ New config syntax, custom scopes on associations, ... source code.tar.gz 2025-02-07 23.0 kB
0.7.0_ New config syntax, custom scopes on associations, ... source code.zip 2025-02-07 35.9 kB
README.md 2025-02-07 1.9 kB
Totals: 5 Items   83.0 kB 0

Added

  • Options to exclude all has_many and has_one or optional belongs_to associations by default. [@Envek]

ruby root.exclude_has_relations root.exclude_optional_belongs_to

Excluded associations can be re-included by include with matching pattern.

  • Exclusion and inclusion patterns can be specified as hashes and/or arrays. [@Envek]

ruby config.root('Forum', featured: true) do |forum| forum.include(parent: {questions: %i[answers votes]}) end

Which is equivalent to:

ruby config.root('Forum', featured: true) do |forum| forum.include(/\Aforum(\.parent(\.questions(\.answers))?)?)?\z/) forum.include(/\Aforum(\.parent(\.questions(\.votes))?)?)?\z/) end

  • Association limits also can be specified as hashes and/or arrays. [@Envek]

    ruby config.root('Forum', featured: true) do |forum| forum.limit_associations_size(15, questions: %i[answers votes]) end

Which is equivalent to:

ruby config.root('Forum', featured: true) do |forum| forum.limit_associations_size(15, 'forum.questions.answers') forum.limit_associations_size(15, 'forum.questions.votes') end

  • Print reason of association exclusion or inclusion in verbose mode. [@Envek]

  • Allow to apply custom scoping to included associations. [@Envek]

ruby config.root('Forum', featured: true) do |forum| forum.include('questions.answers') do order(created_at: :desc) end end

Fixed

  • Error when dumping single-column tables. [@lsantobuono]
  • Bug with null foreign key to back to auxiliary has_one association with not matching names. E.g. user has many profiles and has one default profile, profile belongs to user.
  • Ignored columns handling.
  • Dump relations for records that were dumped earlier with relations excluded.
Source: README.md, updated 2025-02-07