aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/fixture_set/table_rows.rb
Commit message (Collapse)AuthorAgeFilesLines
* Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-131-1/+0
| | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* Move `resolve_sti_reflections` which is table row related code into `TableRow`Ryuta Kamizono2018-11-031-88/+3
|
* Don't pass useless `table_name` to `ModelMetadata.new`Ryuta Kamizono2018-11-031-1/+1
| | | | | | | The `model_metadata` is only used if `model_class` is given. If `model_class` is given, the `table_name` is always `model_class.table_name`.
* Avoid violating key constraints in fixture HABTM associationsJames Le Cuirot2018-10-291-0/+3
| | | | | | | | | When loading fixtures, Ruby 1.9's hash key ordering means that HABTM join table rows are always loaded before the parent table rows, violating foreign key constraints that may be in place. This very simple change ensures that the parent table's key appears first in the hash. Violations may still occur if fixtures are loaded in the wrong order but those instances can be avoided unlike this one.
* Move FixtureSet::ReflectionProxy and FixtureSet::HasManyThroughProxy to ↵Gannon McGibbon2018-10-051-0/+32
| | | | FixtureSet::TableRows
* Introduce FixtureSet::TableRows and FixtureSet::TableRowGannon McGibbon2018-10-051-0/+97