Skip to content

Commit c3aa864

Browse files
committed
Update README
1 parent 565bfe0 commit c3aa864

File tree

1 file changed

+37
-10
lines changed

1 file changed

+37
-10
lines changed

README.md

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,22 @@ sortable via drag'n'drop.
1010

1111
## Installation
1212

13-
```ruby
14-
# Gemfile
15-
gem "active_admin-sortable_tree"
16-
```
13+
1. Add SortableTree to your Gemfile; then `bundle install`
14+
```ruby
15+
gem "active_admin-sortable_tree", "~> 2.0.0"
16+
```
1717

18-
Note: If you experience issues with drag and drop capability, you may need to specify the version for your ActiveAdmin installation. It is reported working using v0.6.6, or if you are using v1.0.0.pre, it is reported working on this commit [b3a9f4b](https://github.com/activeadmin/activeadmin/commit/b3a9f4b3e4051447d011c59649a73f876989a199) or later.
18+
2. Add a require to your JavaScript manifest `app/assets/javascripts/active_admin.js`
1919

20-
```ruby
21-
# Gemfile
22-
gem 'activeadmin', github: 'activeadmin', ref: 'b3a9f4b'
23-
```
20+
```javascript
21+
//= require active_admin/sortable
22+
```
23+
24+
3. Add an import in your stylesheet manifest `app/assets/javascripts/active_admin.js`
25+
26+
```sass
27+
@import "active_admin/sortable";
28+
```
2429

2530
## Usage (Tree)
2631

@@ -157,7 +162,6 @@ index :as => :sortable do
157162
end
158163
```
159164

160-
161165
### Ajax Callback Config
162166

163167
It exposes three Ajax Events: ajaxDone, ajaxFail and ajaxAlways, which
@@ -171,6 +175,29 @@ ActiveAdminSortableEvent.add('ajaxDone', function (){
171175
})
172176
```
173177

178+
### Upgrading to SortableTree 2.0 from 1.0
179+
180+
Upgrading from SortableTree 1.x requires manually specifying assets in your
181+
`app/assets/javascripts/active_admin.js` and `app/assets/stylesheets/active_admin.scss`
182+
files.
183+
184+
185+
### Dependencies
186+
187+
ActiveAdmin::SortableTree 2.0 supports ActiveAdmin 1.0.0+. For previous versions
188+
of ActiveAdmin use older SortableTree versions from the 1.x branch.
189+
190+
Note: If you experience issues with drag and drop capability, you may need to
191+
specify the version for your ActiveAdmin installation. It is reported working
192+
using v0.6.6, or if you are using v1.0.0.pre, it is reported working on this
193+
commit [b3a9f4b](https://github.com/activeadmin/activeadmin/commit/b3a9f4b3e4051447d011c59649a73f876989a199)
194+
or later.
195+
196+
```ruby
197+
# Gemfile
198+
gem 'activeadmin', github: 'activeadmin', ref: 'b3a9f4b'
199+
```
200+
174201
## Semantic Versioning
175202

176203
ActiveAdmin::SortableTree follows [semantic versioning](http://semver.org).

0 commit comments

Comments
 (0)