Sha256: ada7575e053155f0e93a1db3e1b50b3b1be70b9df03473be42eb61b97fdf2307

Contents?: true

Size: 398 Bytes

Versions: 3

Compression:

Stored size: 398 Bytes

Contents

class <%= class_name %><%= " < #{options[:parent].classify}" if options[:parent] %>
<%- unless options[:parent] -%>
  include Toy::Store

  # replace this with whatever adapter you want
  adapter :memory, {}
<%- end -%>

<%- attributes.each do |attribute| -%>
  attribute :<%= attribute.name %>, <%= attribute.type_class %>
<%- end -%>

<%- if options[:timestamps] -%>
  timestamps
<%- end -%>
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
toystore-0.13.2 lib/generators/toystore/model/templates/model.rb
toystore-0.13.1 lib/generators/toystore/model/templates/model.rb
toystore-0.13.0 lib/generators/toystore/model/templates/model.rb