Sha256: 8914a2f4a6b424a0c0724cb5c99f31c4b12eb91ed1b67d5cc9da89671602f05d

Contents?: true

Size: 486 Bytes

Versions: 5

Compression:

Stored size: 486 Bytes

Contents

class Mercury::Image < ActiveRecord::Base

  self.table_name = :mercury_images

  has_attached_file :image, :styles => { :medium => "300x300>", :thumb => "100x100>" },
        :path => ":rails_root/public/system/:attachment/:id/:style/:filename",
        :url => "/system/:attachment/:id/:style/:filename"

  delegate :url, :to => :image

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

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mercury-rails-0.8.0 lib/generators/mercury/install/images/templates/ar_paperclip_image.rb
mercury-rails-0.7.1 lib/generators/mercury/install/images/templates/ar_paperclip_image.rb
mercury-rails-0.7.0 lib/generators/mercury/install/images/templates/ar_paperclip_image.rb
mercury-rails-0.6.0 lib/generators/mercury/install/images/templates/ar_paperclip_image.rb
mercury-rails-0.5.0 lib/generators/mercury/install/images/templates/ar_paperclip_image.rb