Sha256: 5c73d7af936957a981f639ccec08ca05964ba8595ce05ab4e8187bb7e8af6e88

Contents?: true

Size: 655 Bytes

Versions: 1

Compression:

Stored size: 655 Bytes

Contents

module AttachmentMagick
  class MongoidImage
    include Mongoid::Document
    include AutoHtml
    include AutoHtmlFor

    field           :photo_uid
    field           :caption
    field           :priority
    field           :source
    field           :image_type
    image_accessor  :photo
    embedded_in     :imageable, :inverse_of => :image

    auto_html_for :source => "_to_html" do
      youtube(:width => 620, :height => 465)
      vimeo(:width => 620, :height => 465)
    end

    auto_html_for :source => "_to_image" do
      youtube_image
      vimeo_image(:size => :large)
    end

    def imageable
      self._parent
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
attachment_magick-0.1.0 app/models/attachment_magick/mongoid_image.rb