spec/support/models.rb in can_be-0.1.0 vs spec/support/models.rb in can_be-0.2.0
- old
+ new
@@ -8,5 +8,33 @@
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