Sha256: 34173c0ea053254804d4c8850b93bc9010f619ee4e507705e139246ef0535e92

Contents?: true

Size: 832 Bytes

Versions: 4

Compression:

Stored size: 832 Bytes

Contents

# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.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

4 entries across 4 versions & 2 rubygems

Version Path
challah-1.0.0 vendor/bundle/gems/railties-4.0.0/lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.0.0 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.0.0.rc2 lib/rails/generators/test_unit/model/templates/fixtures.yml
railties-4.0.0.rc1 lib/rails/generators/test_unit/model/templates/fixtures.yml