Sha256: 346df106a98fbede83f3df1bdf9badf8c1c8409752638343ff946638c2490221

Contents?: true

Size: 325 Bytes

Versions: 32

Compression:

Stored size: 325 Bytes

Contents

class Mercury::Image
  include Mongoid::Document
  include Mongoid::Paperclip

  has_mongoid_attached_file :image

  validates_presence_of :image

  delegate :url, :to => :image

  def serializable_hash(options = nil)
    options ||= {}
    options[:methods] ||= []
    options[:methods] << :url
    super(options)
  end
end

Version data entries

32 entries across 32 versions & 3 rubygems

Version Path
kiteditor-1.0.4 lib/generators/mercury/install/templates/mongoid_paperclip_image.rb
kiteditor-1.0.2 lib/generators/mercury/install/templates/mongoid_paperclip_image.rb
kiteditor-1.0.1 lib/generators/mercury/install/templates/mongoid_paperclip_image.rb
mercury-rails-0.9.0 lib/generators/mercury/install/images/templates/mongoid_paperclip_image.rb
mercury-rails-0.8.0 lib/generators/mercury/install/images/templates/mongoid_paperclip_image.rb
mercury-rails-0.7.1 lib/generators/mercury/install/images/templates/mongoid_paperclip_image.rb
mercury-rails-0.7.0 lib/generators/mercury/install/images/templates/mongoid_paperclip_image.rb
mercury-rails-0.6.0 lib/generators/mercury/install/images/templates/mongoid_paperclip_image.rb
mercury-rails-0.5.0 lib/generators/mercury/install/images/templates/mongoid_paperclip_image.rb
kuji-mercury-rails-0.3.3 lib/generators/mercury/install/templates/mongoid_paperclip_image.rb
kuji-mercury-rails-0.3.2 lib/generators/mercury/install/templates/mongoid_paperclip_image.rb
mercury-rails-0.3.1 lib/generators/mercury/install/templates/mongoid_paperclip_image.rb