Sha256: 7010b8ee5f27ada13a433c6d7bb39f3effac3336f39c8718437682a18049a8d6

Contents?: true

Size: 391 Bytes

Versions: 2

Compression:

Stored size: 391 Bytes

Contents

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

        included do
          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/gallery.rb
hancock_cms_gallery-1.0.0 lib/hancock/gallery/models/active_record/gallery.rb