Sha256: aaba241d59a0e4fdf5e6fa49713318e92e4235d9ece6c94ee47414d22e568e35

Contents?: true

Size: 489 Bytes

Versions: 5

Compression:

Stored size: 489 Bytes

Contents

module Enjoy::News
  module Models
    module Mongoid
      module Image
        extend ActiveSupport::Concern
        if Enjoy::News.config.gallery_support

          included do
            embedded_in :news, class_name: "Enjoy::News::News"
          end

          include ::Mongoid::EmbeddedFindable
          module ClassMethods
            def find(id)
              find_through(Enjoy::News::News, 'images', id)
            end
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
enjoy_cms_news-0.4.1 lib/enjoy/news/models/mongoid/image.rb
enjoy_cms_news-0.4.0.2 lib/enjoy/news/models/mongoid/image.rb
enjoy_cms_news-0.4.0.1 lib/enjoy/news/models/mongoid/image.rb
enjoy_cms_news-0.4.0 lib/enjoy/news/models/mongoid/image.rb
enjoy_cms_news-0.4.0.beta3 lib/enjoy/news/models/mongoid/image.rb