Sha256: 86e92c538e02002875600eb4a744644f9b1ce5bf684a9980690fd33e9997226e

Contents?: true

Size: 387 Bytes

Versions: 6

Compression:

Stored size: 387 Bytes

Contents

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

        included do
          has_paper_trail
          validates_lengths_from_database
          if Enjoy::Gallery.config.localize
            translates :name
          end

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
enjoy_cms_gallery-0.4.1 lib/enjoy/gallery/models/active_record/gallery.rb
enjoy_cms_gallery-0.4.0.2 lib/enjoy/gallery/models/active_record/gallery.rb
enjoy_cms_gallery-0.4.0.1 lib/enjoy/gallery/models/active_record/gallery.rb
enjoy_cms_gallery-0.4.0 lib/enjoy/gallery/models/active_record/gallery.rb
enjoy_cms_gallery-0.4.0.beta3 lib/enjoy/gallery/models/active_record/gallery.rb
enjoy_cms_gallery-0.4.0.beta1 lib/enjoy/gallery/models/active_record/gallery.rb