aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/fixture_set
Commit message (Collapse)AuthorAgeFilesLines
* Throw friendly error message when fixture is not a hashKir Shatrov2016-12-151-2/+5
| | | | | | Right now, when fixture is not a Hash we throw an error message saying "fixture is not a hash". This is not very user friendly because it's not saying which fixture is invalid.
* Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* applies new string literal convention in activerecord/libXavier Noria2016-08-061-6/+6
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* provide file name for fixture ERBDennis Ushakov2016-03-301-1/+7
|
* Merge pull request #20574 from repinel/fix-db-fixtures-loadYves Senn2015-09-301-4/+19
|\ | | | | | | | | | | | | Allow fixtures YAML files to set the model class in the file itself Conflicts: activerecord/CHANGELOG.md
| * Allow fixtures YAML files to set the model class in the file itselfRoque Pinel2015-09-111-2/+13
|/ | | | | | | | Currently, `set_fixture_class` is only available using the `TestFixtures` concern and it is ignored for `rake db:fixtures:load`. Using the correct model class, it is possible for the fixture load to also load the associations from the YAML files (e.g., `:belongs_to` and `:has_many`).
* Introduce a context for rendering fixtures ERB.Victor Costan2013-12-031-1/+2
| | | | | | | | | | Fixture files are passed through an ERB renderer before being read as YAML. The rendering is currently done in the context of the main object, so method definitons leak into other fixtures, and there is no clean place to define fixture helpers. After this commit, the ERB renderer will use a new subclass of ActiveRecord::FixtureSet.context_class each time a fixture is rendered.
* drop errors constantVipul A M2013-03-271-2/+1
|
* Move/rename files to follow naming conventionsAlexey Muranov2012-10-071-0/+56