Sha256: 443fa233cdfbbf26cb898a947844ad491fb8adfd5d6120fec3731ec586503514

Contents?: true

Size: 883 Bytes

Versions: 1

Compression:

Stored size: 883 Bytes

Contents

require 'active_record'

load File.dirname(__FILE__) + '/schema.rb'

# The Address model will use the default options
class Address < ActiveRecord::Base
  can_be :home_address, :work_address, :vacation_address
end

class Person < ActiveRecord::Base
  can_be :male, :female, field_name: :gender, default_type: :female
end

class Upload < ActiveRecord::Base
  can_be :image_upload, :video_upload, :thumbnail_upload, :document_upload, :pdf_upload
end

class ImageUploadDetail < ActiveRecord::Base
  can_be_detail :upload, :image_upload
end

class VideoUploadDetail < ActiveRecord::Base
  can_be_detail :upload, :video_upload
end

class ThumbnailUploadDetail < ActiveRecord::Base
end

class DocumentUploadDetail
end

class ConfigSpecModel < ActiveRecord::Base
  can_be :type1, :type2
end

class ConfigSpecDetail < ActiveRecord::Base
end

class ConfigSpecDetail2 < ActiveRecord::Base
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
can_be-0.2.0 spec/support/models.rb