Sha256: 1bd33c5fee2c3982e8e30d2e91cc06e51df6275e74a16854daebca9ca82d68e4

Contents?: true

Size: 834 Bytes

Versions: 121

Compression:

Stored size: 834 Bytes

Contents

# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
<% unless attributes.empty? -%>
<% %w(one two).each do |name| %>
<%= name %>:
<% attributes.each do |attribute| -%>
  <%- if attribute.password_digest? -%>
  password_digest: <%%= BCrypt::Password.create('secret') %>
  <%- else -%>
  <%= yaml_key_value(attribute.column_name, attribute.default) %>
  <%- end -%>
  <%- if attribute.polymorphic? -%>
  <%= yaml_key_value("#{attribute.name}_type", attribute.human_name) %>
  <%- end -%>
<% end -%>
<% end -%>
<% else -%>

# This model initially had no columns defined.  If you add columns to the
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
#  column: value
<% end -%>

Version data entries

121 entries across 117 versions & 9 rubygems

Version Path
railties-4.2.11.3 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.11.2 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.11.1 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.11 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.10 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.10.rc1 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.9 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.9.rc2 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.9.rc1 lib/rails/generators/test_unit/model/templates/fixtures.yml
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/railties-4.2.8/lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.8 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.8.rc1 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.7.1 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.7 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.1.16 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.1.16.rc1 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.7.rc1 lib/rails/generators/test_unit/model/templates/fixtures.yml
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.1.15 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.2.6 lib/rails/generators/test_unit/model/templates/fixtures.yml