README.md in imgkit-1.3.5 vs README.md in imgkit-1.3.6

- old
+ new

@@ -141,9 +141,31 @@ </html> EOD kit.stylesheets << css +## CarrierWave Workaround + +Contributed by @ticktricktrack + +```ruby + class MyClass < ActiveRecord::Base + mount_uploader :snapshot, SnapshotUploader + + after_create :take_snapshot + + # private + + def take_snapshot + file = Tempfile.new(["template_#{self.id.to_s}", 'jpg'], 'tmp', :encoding => 'ascii-8bit') + file.write(IMGKit.new(self.html_body, quality: 50, width: 600).to_jpg) + self.snapshot = file + file.unlink + self.save + end + end +``` + ## Note on Patches/Pull Requests * Fork the project. * Setup your development environment with: gem install bundler; bundle install