Skip to content

Update to dragonfly ~>1.0 #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)

2 changes: 1 addition & 1 deletion activeadmin-wysihtml5.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

3 changes: 2 additions & 1 deletion app/models/asset.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/active_admin/wysihtml5/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module ActiveAdmin
module Wysihtml5
VERSION = "1.0.0"
VERSION = "1.1.0"
end
end