This gem provides CarrierWave functionality in Classes persisted by Tire
Add this line to your application's Gemfile:
gem 'carrierwave-tire', git: "[email protected]:megorei/carrierwave-tire.git"
And then execute:
$ bundle
Or install it yourself as:
$ gem install carrierwave-tire
Include CarrierWave::Tire mounter into your model and mount your uploader on a property. For more information about how to write an uploader see CarrierWave documentation.
class Article
include Tire::Model::Persistence
include CarrierWave::Tire
property :filename
mount_uploader :image, ImageUploader, mount_on: :filename
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request