Sha256: 9060f54899c9d940d061a63b7b0251aafdf6e66514a3d715b58162284fef50cf

Contents?: true

Size: 391 Bytes

Versions: 5

Compression:

Stored size: 391 Bytes

Contents

class <%= class_name %>Page < Fae::StaticPage

  @slug = '<%= file_name %>'

  # required to set the has_one associations, Fae::StaticPage will build these associations dynamically
  def self.fae_fields
    {
<% @attributes.each_with_index do |(attr, type), index| -%>
      <%= attr %>: { type: <%= type %> }<%= index + 1 != @attributes.length ? ",\n" : "\n" -%>
<% end -%>
    }
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
fae-rails-1.3.0 lib/generators/fae/templates/models/pages_model.rb
fae-rails-1.2.5 lib/generators/fae/templates/models/pages_model.rb
fae-rails-1.2.4 lib/generators/fae/templates/models/pages_model.rb
fae-rails-1.2.3 lib/generators/fae/templates/models/pages_model.rb
fae-rails-1.2.2 lib/generators/fae/templates/models/pages_model.rb