From 0364650446847671003ce87d1998486069b77eac Mon Sep 17 00:00:00 2001 From: Aaron Dufall Date: Wed, 10 Sep 2014 13:58:24 -0700 Subject: [PATCH 1/3] update accessor for dragonfly 1.0.7 --- app/models/asset.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/asset.rb b/app/models/asset.rb index 5b19bbe..3b0b2c6 100644 --- a/app/models/asset.rb +++ b/app/models/asset.rb @@ -1,5 +1,6 @@ class Asset < ActiveRecord::Base - image_accessor :storage + extend Dragonfly::Model + dragonfly_accessor :storage def percentage_thumb_url(size) width = (storage.width * size).ceil From 47cbf1ca8875e951e276030293796d9d9bbfa195 Mon Sep 17 00:00:00 2001 From: Aaron Dufall Date: Wed, 10 Sep 2014 14:09:34 -0700 Subject: [PATCH 2/3] updated to support dragonfly ~>1.0 --- activeadmin-wysihtml5.gemspec | 2 +- lib/active_admin/wysihtml5/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activeadmin-wysihtml5.gemspec b/activeadmin-wysihtml5.gemspec index 3cefc94..548b9cc 100644 --- a/activeadmin-wysihtml5.gemspec +++ b/activeadmin-wysihtml5.gemspec @@ -14,6 +14,6 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,db,lib,vendor}/**/*"] + ["MIT-LICENSE", "README.md"] s.add_dependency "activeadmin" - s.add_dependency "activeadmin-dragonfly" + s.add_dependency "activeadmin-dragonfly", "~> 0.1" end diff --git a/lib/active_admin/wysihtml5/version.rb b/lib/active_admin/wysihtml5/version.rb index 4a78591..85b7832 100644 --- a/lib/active_admin/wysihtml5/version.rb +++ b/lib/active_admin/wysihtml5/version.rb @@ -1,6 +1,6 @@ module ActiveAdmin module Wysihtml5 - VERSION = "1.0.0" + VERSION = "1.1.0" end end From bc77d30c5b4a710fca4d840c91e2f051ad7acf14 Mon Sep 17 00:00:00 2001 From: Aaron Dufall Date: Wed, 10 Sep 2014 14:19:58 -0700 Subject: [PATCH 3/3] update instruction for dragonfly ~>1.0 and added link to s3 instructions --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 65b45d4..afb684b 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,12 @@ $ rake activeadmin_wysihtml5:install:migrations $ rake db:migrate ``` +Generate dragonfly configuration: + +```bash +$ rails generate dragonfly +```` + ## Usage This gem provides you with a custom formtastic input called `:wysihtml5` to build out an html editor. All you have to do is specify the `:as` option for your inputs. @@ -69,3 +75,7 @@ end * `:huge`: 450px; * an integer representing the height of the editor; +## Use s3 storage + +[instructions found here](https://github.com/markevans/dragonfly-s3_data_store/blob/master/README.md) +