Sha256: 29b2aee5c027d5bf381566cecea831c958e69b5bab51ec7a9e5f89d42252af3f
Contents?: true
Size: 946 Bytes
Versions: 3
Compression:
Stored size: 946 Bytes
Contents
<% 4.times do |i| -%> - "Sample <%= i + 1 %>"<%= ':' if config[:fields].size > 1 %> <% config[:fields][1..-1].each do |field| -%> <% case field.type -%> <% when 'string' -%> <%= field.name -%>: "<%= Faker::Lorem.sentence -%>" <% when 'text' -%> <%= field.name -%>: "<%= Faker::Lorem.paragraph -%>" <% when 'select' -%> <%= field.name -%>: null # Use the value of a select option defined in the app/content_types/<%= config[:name] -%>.rb file. <% when 'boolean' -%> <%= field.name -%>: true # Or false <% when 'date' -%> <%= field.name -%>: <%= Time.now.strftime('%Y/%m/%d') -%> # YYYY/MM/DD <% when 'file' -%> <%= field.name -%>: null # Path to a file in the public/samples folder or to a remote and external file. <% when 'belongs_to' -%> <%= field.name -%>: null # Permalink of the target entry <% when 'many_to_many' -%> <%= field.name -%>: [] # Permalink of the target entries <% end -%> <% end -%> <% end -%>
Version data entries
3 entries across 3 versions & 1 rubygems