Skip to content

Latest commit

 

History

History
677 lines (472 loc) · 44.5 KB

CHANGELOG.md

File metadata and controls

677 lines (472 loc) · 44.5 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

v1.2.2 - 2024-07-16

Fixed

  • Updated .gemspec to exclude unnecessary files from the gem package. #437 ([f440])

v1.2.1 - 2024-06-06

Fixed

  • We no longer delegate the class connection method to the instance. #436 ([davidcelis])

v1.2.0 - 2024-06-03

Added

  • Add support for composite primary keys. #430 ([divagueame])

Changed

  • Refactored CI testing framework and removed the Appraisals gem. Use RAILS_VERSION to switch the Rails version you are currently running the tests against.
  • We now only explicitly test against Rails 6.1+ and Ruby 3.0+.

v1.1.0 - 2023-02-01

Fixed (Possibly Breaking)

  • Use after_save instead of after_commit for clear_scope_changed callback #407 (@Flixt)
  • Rename add_to_list_top and add_to_list_bottom private methods to avoid_collision that handles both cases as well as the case where :add_new_at is nil. Setting an explicit position when :add_new_at is nil will now shuffle other items out of the way if necessary. This may break existing workarounds you have in place to deal with this bug. #411. ([brendon])

v1.0.4 - 2021-04-20

Fixed

  • Add Tests ruby 2.7 and 3.0 #393 ([QWYNG])

v1.0.3 - 2020-12-24

Fixed

  • Silence deprecation warnings in Rails 6 #384 ([h-lame])
  • Add explicit requirement of ActiveSupport::Inflector #387 ([rdvdijk])

v1.0.2 - 2020-09-14

Fixed

  • Get foreign key from reflections when possible #383 (jefftsang)

Removed

v1.0.1 - 2020-02-27

Fixed

  • Invert order when incrementing to circumvent unique index violations (#368)

v1.0.0 - 2019-09-26

Full Changelog

Removed

  • BREAKING CHANGE: Support for Rails 3.2 > 4.1 has been removed. 0.9.19 is the last version that supports these Rails versions

Added

  • Added Troubleshooting Database Deadlock Errors section to README.md
  • Added support for Rails 6.0 in testing
  • Various README fixes
  • A new method called current_position now exists and returns the integer position of the item it's called on, or nil if the position isn't set.

v0.9.19 - 2019-03-12

Full Changelog

Added

  • Allow acts_as_list_no_update blocks to be nested @conorbdaly

v0.9.18 - 2019-03-08

Full Changelog

Added

Changed

  • Let's start a new direction with the CHANGELOG file @mainameiz

Fixed

  • Fix sqlite3 gem pinning breaking tests

v0.9.17 (2018-10-29)

Full Changelog

Closed issues:

  • Inconsistent behavior #330
  • Using top\_of\_list set to 1 and setting a record to index 0 triggers a PG::UniqueViolation #322

Merged pull requests:

  • Feature/add exception to wrong position #323 (TheNeikos)
  • Methods move_to_bottom and move_to_top should not fail when there are unique constraints #320 (faucct)

v0.9.16 (2018-08-30)

Full Changelog

Closed issues:

  • Re-ordering at specific position #318
  • no\_update is not applied to subclasses #314
  • NoMethodError: undefined method `acts_as_list' #303
  • Cannot create item at position 0 #297

Merged pull requests:

  • Unscope select to avoid PG::UndefinedFunction #283 (donv)

v0.9.15 (2018-06-11)

Full Changelog

Merged pull requests:

v0.9.14 (2018-06-05)

Full Changelog

Closed issues:

  • insert\_at saves invalid ActiveRecord objects #311

Merged pull requests:

v0.9.13 (2018-06-05)

Full Changelog

Merged pull requests:

  • Fix unique index constraint failure on item destroy #313 (yjukaku)

v0.9.12 (2018-05-02)

Full Changelog

Closed issues:

  • acts_as_list methods on has_many through #308
  • Travis badge #307
  • Unscoping breaks STI subclasses, but is soon to be fixed in Rails #291
  • Refactor string eval for scope_condition #227

Merged pull requests:

v0.9.11 (2018-03-19)

Full Changelog

Closed issues:

  • Setting position: nil on update returns Column 'position' cannot be null instead of putting the item at the start or the end of the list, like it does on create. #302
  • Switching to Semaphore #301
  • Dropping jruby support #300
  • Rails 5.2.0 #299
  • Cannot update record position when scoped to enum #298
  • add\_new\_at: :top does not work #296
  • remove_from_list causing "wrong number of arguments (given 2, expected 0..1)" #293
  • Passing raw strings to reorder deprecated in Rails 5.2 #290

Merged pull requests:

v0.9.10 (2017-11-19)

Full Changelog

Closed issues:

  • Make insert_at respect position when creating a new record #287
  • Why does acts_as_list override rails validation on it's own field? #269

Merged pull requests:

v0.9.9 (2017-10-03)

Full Changelog

Merged pull requests:

  • Added fixed values option for scope array #286 (smoyth)

v0.9.8 (2017-09-28)

Full Changelog

Closed issues:

  • Deadlocking in update_positions count query #285
  • Updating the position fails uniqueness constraint. #275

v0.9.7 (2017-07-06)

Full Changelog

v0.9.6 (2017-07-05)

Full Changelog

Closed issues:

  • undefined method `+' for nil:NilClass #278
  • Enum does not scope correctly #277
  • Can we don't use remove_from_list when destroy a lot objects? #276
  • The NoUpdate code rely's on AS::Concern #273
  • ActiveRecord associations are no longer required (even though belongs_to_required_by_default == true) #268
  • Unique constraint violation on move_higher, move_lower, destroy #267

Merged pull requests:

v0.9.5 (2017-04-04)

Full Changelog

Closed issues:

  • acts_as_list_class.maximum(position_column) is causing the entire table to lock #264
  • Be more precise with unscope-ing #263

Merged pull requests:

  • Use bottom_position_in_list instead of the highest value in the table #266 (brendon)
  • Be more surgical about unscoping #265 (brendon)

v0.9.4 (2017-03-16)

Full Changelog

Merged pull requests:

v0.9.3 (2017-03-14)

Full Changelog

Closed issues:

  • Rails 5.1.0.beta1 deprecation #257
  • Move item X after item Y #256
  • Is there way to specify the position when creating a resource? #255

Merged pull requests:

  • Don't update a child destroyed via relation #261 (brendon)
  • No update list for collection classes #260 (IlkhamGaysin)
  • Fix deprecation introduced in ActiveRecord 5.1.0.beta1. Closes #257 #259 (CvX)
  • Refactor column definer module #258 (ledestin)

v0.9.2 (2017-02-07)

Full Changelog

Closed issues:

  • Getting invalid input syntax for uuid #253

v0.9.1 (2017-01-26)

Full Changelog

Closed issues:

  • DEPRECATION WARNING on rails 5.0 as of acts_as_list 0.9 #251
  • higher_items returns items with the same position value #247
  • Broken with unique constraint on position #245

Merged pull requests:

  • fixes #251 table_exists? deprecation warning with Rails 5.0 #252 (zharikovpro)

v0.9.0 (2017-01-23)

Full Changelog

Closed issues:

  • warning: too many arguments for format string #239
  • Broken tests related to time comparison #238
  • Shuffling positions is halting the callback chain #234
  • Reorder positions #233
  • Tests break when upgrading from 0.7.2 to 0.7.4 #228
  • RE #221 needing a test #226
  • Adding to existing model with data and methods don't work #209
  • Position is set incorrectly when circular dependencies exist #153

Merged pull requests:

v0.8.2 (2016-09-23)

Full Changelog

Closed issues:

  • We're a repo now, no longer a fork attached to rails/acts_as_list #232
  • Break away from rails/acts_as_list #224
  • Problem when inserting straight at top of list #109

Merged pull requests:

  • Show items with same position in higher and lower items #231 (jpalumickas)
  • fix setting position when previous position was nil #230 (StoneFrog)

v0.8.1 (2016-09-06)

Full Changelog

Closed issues:

  • Rubinius Intermittent testing error #218
  • ActiveRecord dependency causes rake assets:compile to fail without access to a database #84

Merged pull requests:

  • Refactor class_eval with string into class_eval with block #215 (rdvdijk)

v0.8.0 (2016-08-23)

Full Changelog

Closed issues:

  • Behavior with DB default seems unclear #219

Merged pull requests:

  • No longer a need specify additional rbx gems #225 (brendon)
  • Fix position when no serial positions #223 (jpalumickas)
  • Bug: Specifying a position with add_new_at: :top fails to insert at that position #220 (brendon)

v0.7.7 (2016-08-18)

Full Changelog

Closed issues:

  • Issue after upgrading to 0.7.5: No connection pool with id primary found. #214
  • Changing scope is inconsistent based on add_new_at #138
  • Duplicate positions and lost items #76

Merged pull requests:

v0.7.6 (2016-07-15)

Full Changelog

Closed issues:

  • add_new_at nil with scope causes NoMethodError #211

Merged pull requests:

v0.7.5 (2016-06-30)

Full Changelog

Implemented enhancements:

Closed issues:

  • Exception raised when calling destroy "NameError - instance variable @scope_changed not defined:" #206
  • Undefined instance variable @scope_changed since 0.7.3 #199
  • Reordering large lists is slow #198
  • Reparenting child leaves gap in source list in rails 5 #194
  • Support rails 5 ? #186
  • I get a NoMethodError: undefined method `acts_as_list' when trying to include acts_as_list #176
  • Phenomenon of mysterious value of the position is skipped by one #166
  • Model.find being called twice with acts_as_list on destroy #161
  • scope\_changed? problem with acts_as_paranoid #158
  • Inconsistent behaviour between Symbol and Array scopes #155
  • insert_at doesn't seem to be working in ActiveRecord callback (Rails 4.2) #150
  • Project Documentation link redirects to expired domain #149
  • Problem when updating an position of array of AR objects. #137
  • Unexpected behaviour when inserting consecutive items with default positions #124
  • self.reload prone to error #122
  • Rails 3.0.x in_list causes the return of default_scope #120
  • Relationships with dependency:destroy cause ActiveRecord::RecordNotFound #118
  • Using insert_at with values with type String #117
  • Batch setting of position #112
  • position: 0 now makes model pushed to top? #110
  • Create element in default position #103
  • Enhancement: Expose scope object #97
  • Shuffle list #96
  • Creating an item with a nil scope should not add it to the list #92
  • Performance Improvements #88
  • has_many :through or has_many_and_belongs_to_many support #86
  • move_higher/move_lower vs move_to_top/move_to_bottom act differently when item is already at top or bottom #77
  • Limiting the list size #61
  • Adding multiple creates strange ordering #55
  • Feature: sort #26

Merged pull requests:

v0.7.4 (2016-04-15)

Full Changelog

Closed issues:

  • Releasing a new gem version #196

Merged pull requests:

v0.7.3 (2016-04-14)

Full Changelog

v0.7.2 (2016-04-01)

Full Changelog

Closed issues:

  • DEPRECATION WARNING: Passing string to define callback on Rails 5 beta 3 #191
  • Why is add\_to\_list\_bottom private? #187
  • Ordering of children when there are two possible parent models. #172
  • Fix the jruby and rbx builds #169
  • Unable to run tests #162
  • shuffle_positions_on_intermediate_items is creating problems #134
  • introduce Changelog file to quickly track changes #68
  • Mongoid support? #52

Merged pull requests:

  • Add filename/line number to class_eval call #193 (hfwang)
  • Use a symbol as a string to define callback #192 (brendon)
  • Pin changelog generator to a working version #190 (fabn)
  • Fix bug, position is recomputed when object saved #188 (chrisortman)
  • Update bundler before running tests, fixes test run on travis #179 (fabn)
  • Changelog generator, closes #68 #177 (fabn)
  • Updating README example #175 (ryanbillings)
  • Adds description about various options available with the acts_as_list method #168 (udit7590)
  • Small changes to DRY up list.rb #163 (Albin-Willman)
  • Only swap changed attributes which are persistable, i.e. are DB columns. #152 (ludwigschubert)

0.7.2 (2015-05-06)

Full Changelog

0.7.1 (2015-05-06)

Full Changelog

Merged pull requests:

0.7.0 (2015-05-01)

Full Changelog

Closed issues:

  • Problem with reordering scoped list items #154
  • Can no longer load acts_as_list in isolation if Rails is installed #145

Merged pull requests:

0.6.0 (2014-12-24)

Full Changelog

Closed issues:

  • Deprecation Warning: sanitize_sql_hash_for_conditions is deprecated and will be removed in Rails 5.0 #143
  • Release a new gem version #136

Merged pull requests:

  • Fix sanitize_sql_hash_for_conditions deprecation warning in Rails 4.2 #140 (eagletmt)
  • Simpler method to find the subclass name #139 (brendon)
  • Rails4 enum column support #130 (arunagw)
  • use eval for determining the self.class.name useful when this is used in an abstract class #123 (flarik)

0.5.0 (2014-10-31)

Full Changelog

Closed issues:

  • I want to have my existing records works like list #133
  • Add Support For Multiple Indexes #127
  • changing parent_id does not update item positions #126
  • How to exclude objects to be positioned? #125
  • Scope for Polymorphic association + ManyToMany #106
  • Bug when use #insert_at on an invalid ActiveRecord object #99
  • has_many :through with acts as list #95
  • Update position when scope changes #19

Merged pull requests:

  • Cast column default value to int before comparing with position column #129 (wioux)
  • Fix travis builds for rbx #128 (meineerde)
  • Use unscoped blocks instead of chaining #121 (brendon)
  • Make acts_as_list more compatible with BINARY column #116 (sikachu)
  • Added help notes on non-association scopes #115 (VorontsovIE)
  • Let AR::Base properly lazy-loaded if Railtie is available #114 (amatsuda)

0.4.0 (2014-02-22)

Full Changelog

Closed issues:

  • insert_at creates gaps #108
  • move_lower and move_higher not working returning nil #57
  • Mass-assignment issue with 0.1.8 #50
  • validates error #49
  • Ability to move multiple at once #40
  • Duplicates created when using accepts_nested_attributes_for #29

Merged pull requests:

0.3.0 (2013-08-02)

Full Changelog

Closed issues:

  • act_as_list didn't install with bundle install #83
  • Cannot update to version 0.1.7 #48
  • when position is null all new items get inserted in position 1 #41

Merged pull requests:

0.2.0 (2013-02-28)

Full Changelog

Merged pull requests:

  • Fix update_all deprecation warnings in Rails 4.0.0.beta1 #73 (soffes)
  • Add quotes to Id in SQL requests #69 (noefroidevaux)
  • Update position when scope changes #67 (philippfranke)
  • add and categorize public instance methods in readme; add misc notes to ... #66 (barelyknown)
  • Updates #bottom_item .find syntax to >= Rails 3 compatible syntax. #65 (tvdeyen)
  • add GitHub Flavored Markdown to README #63 (phlipper)

0.1.9 (2012-12-04)

Full Changelog

Closed issues:

  • Mysql2 error #54
  • Use alternative column name? #53

Merged pull requests:

  • attr-accessible can be damaging, is not always necessary. #60 (graemeworthy)
  • More reliable lower/higher item detection #59 (miks)
  • Instructions for using an array with scope #58 (zukowski)
  • Attr accessible patch, should solve #50 #51 (fabn)
  • support accepts_nested_attributes_for multi-destroy #46 (saberma)

0.1.8 (2012-08-09)

Full Changelog

0.1.7 (2012-08-09)

Full Changelog

Closed issues:

  • Remove use of update_attribute #44
  • Order is reversed when adding multiple rows at once #34

Merged pull requests:

  • Fixed issue with update_positions that wasn't taking 'scope_condition' into account #47 (bastien)
  • Replaced usage of update_attribute with update_attribute! #45 (kevmoo)
  • use self.class.primary_key instead of id in shuffle_positions_on_intermediate_items #42 (servercrunch)
  • initialize gem #39 (megatux)
  • Added ability to set item positions directly (e.g. In a form) #38 (dubroe)
  • Prevent SQL error when position_column is not unique #37 (hinrik)
  • Add installation instructions to README.md #35 (mark-rushakoff)

0.1.6 (2012-04-19)

Full Changelog

Closed issues:

  • eval mistakenly resolved the module path #32
  • Duplicated positions when creating parent and children from scratch in 0.1.5 #31
  • add info about v0.1.5 require Rails 3 #28
  • position not updated with move_higher or move_lover #23

Merged pull requests:

0.1.5 (2012-02-24)

Full Changelog

Closed issues:

  • increment_positions_on_lower_items called twice on insert_at with new item #21
  • Change bundler dependency from ~>1.0.0 to ~>1.0 #20
  • decrement_positions_on_lower_items method #17
  • New gem release #16
  • acts_as_list :scope => "doesnt_seem_to_work" #12
  • don't work perfectly with default_scope #11
  • MySQL: Position column MUST NOT have default #10
  • insert_at fails on postgresql w/ non-null constraint on position_column #8

Merged pull requests:

  • Efficiency improvement for insert_at when repositioning an existing item #27 (bradediger)
  • Use before validate instead of before create #25 (webervin)
  • Massive test refactorings. #24 (splattael)
  • Silent migrations to reduce test noise. #22 (splattael)
  • Should decrement lower items after the item has been destroyed to avoid unique key conflicts. #18 (aepstein)
  • Fix spelling and grammar #15 (tmiller)
  • store_at_0 should yank item from the list then decrement items to avoid r #14 (aepstein)
  • Support default_scope ordering by calling .unscoped #13 (tanordheim)

0.1.4 (2011-07-27)

Full Changelog

Merged pull requests:

0.1.3 (2011-06-10)

Closed issues:

  • Graph like behaviour #5
  • Updated Gem? #4

Merged pull requests:

  • Converted into a gem... plus some slight refactors #6 (chaffeqa)
  • Fixed test issue for test_injection: expected SQL was reversed. #3 (afriqs)
  • Added an option to set the top of the position #2 (danielcooper)
  • minor change to acts_as_list's callbacks #1 (tiegz)