acts_as_list 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4602fbf2208d5b39ba3a0fe78b4ab3ad0947e69a
4
- data.tar.gz: f3ef72c6695c6441366c657f41a3d8b273e7c588
3
+ metadata.gz: b89748f05d5967e1a76360d733d46cce9e8d792c
4
+ data.tar.gz: f5cedd8786d6d4a4ab5fb2446974b05fe481bf95
5
5
  SHA512:
6
- metadata.gz: 499b30c7a96fb04f2ab8c66414c7165686652b4969692a1e82a3af482b6f54e49d2270ed902466721874d0fcbe144cbc541fad09b55f22c385a0f181ffca8b3d
7
- data.tar.gz: 38ae417b51053320bf227a3be9b44c8de46f754990bd4d74e427c47da6502e282e20c02ce4a47dc0466ee488c73fec14f8b44af660645379a412c9632ed2e29b
6
+ metadata.gz: b6e8877539d4c8d88a53fe4b81b78835541f5ea9906a8a0da51e6dc9f615e72a519116f8fecf37053654bbf5cd605bc9d70d5a86c8317f0cb86a4346bf28a826
7
+ data.tar.gz: 23dc051623bd30cce636ec1db440a1d7cbaae9bf66c16397f4a602fa94f3899c6f5a1a1d82becaee0c2ce176c16ef6818d6ad0d935764a0171aa77b01f744619
@@ -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: "destroyed_via_scope? || act_as_list_no_update?"
7
- after_destroy :decrement_positions_on_lower_items, unless: "destroyed_via_scope? || act_as_list_no_update?"
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
- !higher_item
145
+ !higher_items(1).exists?
146
146
  end
147
147
 
148
148
  def last?
149
149
  return false unless in_list?
150
- !lower_item
150
+ !lower_items(1).exists?
151
151
  end
152
152
 
153
153
  # Return the next higher item in the list.
@@ -1,7 +1,7 @@
1
1
  module ActiveRecord
2
2
  module Acts
3
3
  module List
4
- VERSION = '0.9.3'
4
+ VERSION = '0.9.4'
5
5
  end
6
6
  end
7
7
  end
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.3
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-14 00:00:00.000000000 Z
13
+ date: 2017-03-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord