Sha256: a69c8b53217dd7952bbd667d1dfe923aaa5d8ffaecde9e708c2dcf6e11ed365c

Contents?: true

Size: 301 Bytes

Versions: 2

Compression:

Stored size: 301 Bytes

Contents

class Image < ActiveRecord::Base

  has_attached_file :image, :styles => { :medium => "300x300>", :thumb => "100x100>" }

  delegate :url, :to => :image

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

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mercury-rails-0.2.3 app/models/image.rb
mercury-rails-0.2.0 app/models/image.rb