Sha256: 2b6a10794b4461de80b7ed5580ebb4aac614c2901188a36261b08a7306b64ea9

Contents?: true

Size: 704 Bytes

Versions: 12

Compression:

Stored size: 704 Bytes

Contents

=begin

  This model is used to test:

    - Dragonfly Attachments
    - Paperclip Attachments

=end

class Asset < ActiveRecord::Base

  ##
  # Dragonfly Stuff
  #

  if defined?(Dragonfly)

    image_accessor :dragonfly

    image_accessor :dragonfly_required
    validates :dragonfly_required, :presence => true

  end

  ##
  # Paperclip Stuff
  #

  if defined?(Paperclip)

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

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

  end

  ##
  # Instance Methods
  #

  def original_file_name
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
typus-3.0.11.rc5 test/fixtures/rails_app/app/models/asset.rb
typus-3.0.11.rc4 test/fixtures/rails_app/app/models/asset.rb
typus-3.0.11.rc3 test/fixtures/rails_app/app/models/asset.rb
typus-3.1.0.rc7 test/fixtures/rails_app/app/models/asset.rb
typus-3.1.0.rc6 test/fixtures/rails_app/app/models/asset.rb
typus-3.1.0.rc5 test/fixtures/rails_app/app/models/asset.rb
typus-3.1.0.rc4 test/fixtures/rails_app/app/models/asset.rb
typus-3.1.0.rc3 test/fixtures/rails_app/app/models/asset.rb
typus-3.1.0.rc2 test/fixtures/rails_app/app/models/asset.rb
typus-3.0.11.rc2 test/fixtures/rails_app/app/models/asset.rb
typus-3.0.11.rc1 test/fixtures/rails_app/app/models/asset.rb
typus-3.1.0.rc1 test/fixtures/rails_app/app/models/asset.rb