Sha256: 82d80ae0ae10f2309417b434029d6e543bea83b577745febf9cb376329ec3da6

Contents?: true

Size: 386 Bytes

Versions: 8

Compression:

Stored size: 386 Bytes

Contents

class StaticPage < ApplicationRecord
  belongs_to :structure

  has_many :pictures, as: :assetable, dependent: :destroy
  has_many :attachment_files, as: :assetable, dependent: :destroy, autosave: true

  validates_presence_of :title, :content

  enumerated_attribute :static_page_type, id_attribute: :kind

  fileuploads :pictures, :attachment_files
  translates :title, :content

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ab_admin-0.11.0 lib/generators/ab_admin/install/templates/models/static_page.rb
ab_admin-0.10.0 lib/generators/ab_admin/install/templates/models/static_page.rb
ab_admin-0.9.0 lib/generators/ab_admin/install/templates/models/static_page.rb
ab_admin-0.8.3 lib/generators/ab_admin/install/templates/models/static_page.rb
ab_admin-0.8.2 lib/generators/ab_admin/install/templates/models/static_page.rb
ab_admin-0.8.1 lib/generators/ab_admin/install/templates/models/static_page.rb
ab_admin-0.8.0 lib/generators/ab_admin/install/templates/models/static_page.rb
ab_admin-0.7.0 lib/generators/ab_admin/install/templates/models/static_page.rb