Sha256: 8190b114d61c25576c1bfe38e0e272d073765742b17114039e50f88a925d6768
Contents?: true
Size: 937 Bytes
Versions: 22
Compression:
Stored size: 937 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 # Slug of the target entry <% when 'many_to_many' -%> <%= field.name -%>: [] # Array of target entry slugs <% end -%> <% end -%> <% end -%>
Version data entries
22 entries across 22 versions & 1 rubygems