Sha256: 2110bb44ddfcdf54de8522662af1ae229001039bc1d92a1810cdf21b182ba66e
Contents?: true
Size: 979 Bytes
Versions: 32
Compression:
Stored size: 979 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 -%>: /samples/<%= config[:slug] -%>/yourfile.txt # 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
32 entries across 32 versions & 1 rubygems