Sha256: 65f3073f3773529628a0fd7b3e81a7a0b547e066c7db3d7b5efe862c518d36cf

Contents?: true

Size: 602 Bytes

Versions: 2

Compression:

Stored size: 602 Bytes

Contents

class FieldTest < ActiveRecord::Base
  has_many :nested_field_tests, :dependent => :destroy, :inverse_of => :field_test
  accepts_nested_attributes_for :nested_field_tests, :allow_destroy => true

  has_one :comment, :as => :commentable
  accepts_nested_attributes_for :comment, :allow_destroy => true

  has_attached_file :paperclip_asset, :styles => { :thumb => "100x100>" }
  attr_accessor :delete_paperclip_asset
  before_validation { self.paperclip_asset = nil if self.delete_paperclip_asset == '1' }

  image_accessor :dragonfly_asset
  mount_uploader :carrierwave_asset, CarrierwaveUploader
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_admin-0.6.0 spec/dummy_app/app/active_record/field_test.rb
rails_admin-0.5.0 spec/dummy_app/app/active_record/field_test.rb