diff options
author | Yves Senn <yves.senn@gmail.com> | 2012-12-26 15:16:09 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2012-12-26 16:38:16 +0100 |
commit | 5203b6dd50dd88904c57c001ed49c157b3afe536 (patch) | |
tree | 59773c8496352442f5ea67b817ab18d38e91fb63 /railties/lib/rails/generators/test_unit/model/templates/fixtures.yml | |
parent | 885f59f6852cce670b48680fa0a1b6a4b0998291 (diff) | |
download | rails-5203b6dd50dd88904c57c001ed49c157b3afe536.tar.gz rails-5203b6dd50dd88904c57c001ed49c157b3afe536.tar.bz2 rails-5203b6dd50dd88904c57c001ed49c157b3afe536.zip |
backport #8616, quote column names in generated fixture files
Conflicts:
railties/CHANGELOG.md
railties/lib/rails/generators/test_unit/model/model_generator.rb
railties/lib/rails/generators/test_unit/model/templates/fixtures.yml
railties/test/generators/model_generator_test.rb
Diffstat (limited to 'railties/lib/rails/generators/test_unit/model/templates/fixtures.yml')
-rw-r--r-- | railties/lib/rails/generators/test_unit/model/templates/fixtures.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/test_unit/model/templates/fixtures.yml b/railties/lib/rails/generators/test_unit/model/templates/fixtures.yml index 5c8780aa64..2c33766418 100644 --- a/railties/lib/rails/generators/test_unit/model/templates/fixtures.yml +++ b/railties/lib/rails/generators/test_unit/model/templates/fixtures.yml @@ -3,12 +3,12 @@ <% unless attributes.empty? -%> one: <% attributes.each do |attribute| -%> - <%= attribute.name %>: <%= attribute.default %> + <%= yaml_key_value(attribute.name, attribute.default) %> <% end -%> two: <% attributes.each do |attribute| -%> - <%= attribute.name %>: <%= attribute.default %> + <%= yaml_key_value(attribute.name, attribute.default) %> <% end -%> <% else -%> # This model initially had no columns defined. If you add columns to the |