Sha256: 334751754e5a60288e72ff536941ac556651b75120f0758a04095004d6dfe06c
Contents?: true
Size: 910 Bytes
Versions: 2
Compression:
Stored size: 910 Bytes
Contents
<% 4.times do |i| -%> - "Sample <%= i + 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
locomotivecms_wagon-1.3.1 | generators/content_type/data/%name%.yml.tt |
locomotivecms_wagon-1.3.0 | generators/content_type/data/%name%.yml.tt |