-
Notifications
You must be signed in to change notification settings - Fork 2.3k
CarrierWave
bbenezech edited this page Feb 1, 2012
·
15 revisions
Automatically detected.
Your model should look like this:
class Article < ActiveRecord::Base
mount_uploader :asset, AssetUploader
# don't forget those if you use :attr_accessible (delete method and form caching method are provided by Carrierwave and used by RailsAdmin)
attr_accessible :asset, :asset_cache, :remove_asset
end
You can specify the field as a 'carrierwave' type if not detected:
field :asset, :carrierwave
Now a file upload field will be added to your model's form.