acts_as_list 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b89748f05d5967e1a76360d733d46cce9e8d792c
|
4
|
+
data.tar.gz: f5cedd8786d6d4a4ab5fb2446974b05fe481bf95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6e8877539d4c8d88a53fe4b81b78835541f5ea9906a8a0da51e6dc9f615e72a519116f8fecf37053654bbf5cd605bc9d70d5a86c8317f0cb86a4346bf28a826
|
7
|
+
data.tar.gz: 23dc051623bd30cce636ec1db440a1d7cbaae9bf66c16397f4a602fa94f3899c6f5a1a1d82becaee0c2ce176c16ef6818d6ad0d935764a0171aa77b01f744619
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v0.9.3](https://github.com/swanandp/acts_as_list/tree/v0.9.3) (2017-03-14)
|
4
|
+
[Full Changelog](https://github.com/swanandp/acts_as_list/compare/v0.9.2...v0.9.3)
|
5
|
+
|
6
|
+
**Closed issues:**
|
7
|
+
|
8
|
+
- Rails 5.1.0.beta1 deprecation [\#257](https://github.com/swanandp/acts_as_list/issues/257)
|
9
|
+
- Move item X after item Y [\#256](https://github.com/swanandp/acts_as_list/issues/256)
|
10
|
+
- Is there way to specify the position when creating a resource? [\#255](https://github.com/swanandp/acts_as_list/issues/255)
|
11
|
+
|
12
|
+
**Merged pull requests:**
|
13
|
+
|
14
|
+
- Don't update a child destroyed via relation [\#261](https://github.com/swanandp/acts_as_list/pull/261) ([brendon](https://github.com/brendon))
|
15
|
+
- No update list for collection classes [\#260](https://github.com/swanandp/acts_as_list/pull/260) ([IlkhamGaysin](https://github.com/IlkhamGaysin))
|
16
|
+
- Fix deprecation introduced in ActiveRecord 5.1.0.beta1. Closes \#257 [\#259](https://github.com/swanandp/acts_as_list/pull/259) ([CvX](https://github.com/CvX))
|
17
|
+
- Refactor column definer module [\#258](https://github.com/swanandp/acts_as_list/pull/258) ([ledestin](https://github.com/ledestin))
|
18
|
+
|
3
19
|
## [v0.9.2](https://github.com/swanandp/acts_as_list/tree/v0.9.2) (2017-02-07)
|
4
20
|
[Full Changelog](https://github.com/swanandp/acts_as_list/compare/v0.9.1...v0.9.2)
|
5
21
|
|
@@ -3,8 +3,8 @@ module ActiveRecord::Acts::List::CallbackDefiner #:nodoc:
|
|
3
3
|
caller_class.class_eval do
|
4
4
|
before_validation :check_top_position, unless: :act_as_list_no_update?
|
5
5
|
|
6
|
-
before_destroy :lock!, unless:
|
7
|
-
after_destroy :decrement_positions_on_lower_items, unless:
|
6
|
+
before_destroy :lock!, unless: Proc.new { destroyed_via_scope? || act_as_list_no_update? }
|
7
|
+
after_destroy :decrement_positions_on_lower_items, unless: Proc.new { destroyed_via_scope? || act_as_list_no_update? }
|
8
8
|
|
9
9
|
before_update :check_scope, unless: :act_as_list_no_update?
|
10
10
|
after_update :update_positions, unless: :act_as_list_no_update?
|
@@ -142,12 +142,12 @@ module ActiveRecord
|
|
142
142
|
|
143
143
|
def first?
|
144
144
|
return false unless in_list?
|
145
|
-
!
|
145
|
+
!higher_items(1).exists?
|
146
146
|
end
|
147
147
|
|
148
148
|
def last?
|
149
149
|
return false unless in_list?
|
150
|
-
!
|
150
|
+
!lower_items(1).exists?
|
151
151
|
end
|
152
152
|
|
153
153
|
# Return the next higher item in the list.
|
data/lib/acts_as_list/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-03-
|
13
|
+
date: 2017-03-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|