Sha256: f28d8ff330ef5f557459e139308c2b78c2d6d240fd688ca84c36c6f6e757a3da

Contents?: true

Size: 495 Bytes

Versions: 7

Compression:

Stored size: 495 Bytes

Contents

module Adminpanel
  class <%= capitalized_resource %> < ActiveRecord::Base
    include Adminpanel::Base

    <%= associations if has_associations? -%>
    <%= get_gallery if has_gallery? -%>

    def self.form_attributes
      [
<%= indent(get_attribute_hash, 8) + ',' %>
<%= indent(file_field_form_hash, 8) if has_gallery? %>
      ]
    end

    def self.display_name
      '<%= capitalized_resource %>' #singular
    end

    # def self.icon
    #     "truck" # fa-{icon}
    # end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
adminpanel-2.1.7 lib/generators/adminpanel/resource/templates/adminpanel_resource_template.rb
adminpanel-2.1.6 lib/generators/adminpanel/resource/templates/adminpanel_resource_template.rb
adminpanel-2.1.5 lib/generators/adminpanel/resource/templates/adminpanel_resource_template.rb
adminpanel-2.1.3 lib/generators/adminpanel/resource/templates/adminpanel_resource_template.rb
adminpanel-2.1.2 lib/generators/adminpanel/resource/templates/resource.rb
adminpanel-2.1.1 lib/generators/adminpanel/resource/templates/resource.rb
adminpanel-2.1.0 lib/generators/adminpanel/resource/templates/resource.rb