Sha256: 2fa247c3446c8095f4f00b784b9a52f798773323bd9d5cc09591fce5cc05a3e0

Contents?: true

Size: 458 Bytes

Versions: 2

Compression:

Stored size: 458 Bytes

Contents

module Hancock::Gallery
  module Models
    module ActiveRecord
      module Image
        extend ActiveSupport::Concern

        included do
          # belongs_to :hancock_gallery_imagable, polymorphic: true

          has_paper_trail
          validates_lengths_from_database
          if Hancock::Gallery.config.localize
            translates :name
          end

          scope :sorted, -> { order(lft: :asc) }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hancock_cms_gallery-1.0.2 lib/hancock/gallery/models/active_record/image.rb
hancock_cms_gallery-1.0.0 lib/hancock/gallery/models/active_record/image.rb