Skip to content
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

Add support for Ruby 2.7 and it's kwargs #999

Merged
merged 1 commit into from
May 7, 2020
Merged
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
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
- postgresql

rvm:
- 2.7.0
- 2.6.5
- 2.5.5
- 2.4.6
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ Each change should fall into categories that would affect whether the release is

As such, _Breaking Changes_ are major. _Features_ would map to either major or minor. _Fixes_, _Performance_, and _Misc_ are either minor or patch, the difference being kind of fuzzy for the purposes of history. Adding _Documentation_ (including tests) would be patch level.

### [Master / Unreleased](https://github.com/mbleigh/acts-as-taggable-on/compare/v6.5.0...master)

* Fixes
* [@nbulaj Add support for Ruby 2.7 and it's kwargs](https://github.com/mbleigh/acts-as-taggable-on/pull/910)

### [6.5.0 / 2019-11-07](https://github.com/mbleigh/acts-as-taggable-on/compare/v6.0.0...v6.5.0)

* Features
Expand Down
2 changes: 1 addition & 1 deletion lib/acts_as_taggable_on/tagger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def acts_as_tagger(opts={})
owned_taggings_scope = opts.delete(:scope)

has_many :owned_taggings, owned_taggings_scope,
opts.merge(
**opts.merge(
as: :tagger,
class_name: '::ActsAsTaggableOn::Tagging',
dependent: :destroy
Expand Down
2 changes: 1 addition & 1 deletion lib/acts_as_taggable_on/tagging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Tagging < ::ActiveRecord::Base #:nodoc:
belongs_to :tag, class_name: '::ActsAsTaggableOn::Tag', counter_cache: ActsAsTaggableOn.tags_counter
belongs_to :taggable, polymorphic: true

belongs_to :tagger, { polymorphic: true, optional: true }
belongs_to :tagger, polymorphic: true, optional: true

scope :owned_by, ->(owner) { where(tagger: owner) }
scope :not_owned, -> { where(tagger_id: nil, tagger_type: nil) }
Expand Down
2 changes: 1 addition & 1 deletion spec/acts_as_taggable_on/taggable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@

expect(TaggableModel.tagged_with(%w(bob tricia), wild: true, any: true).to_a.sort_by { |o| o.id }).to eq([bob, frank, steve])
expect(TaggableModel.tagged_with(%w(bob tricia), wild: true, exclude: true).to_a).to eq([jim])
expect(TaggableModel.tagged_with('ji', wild: true, any: true).to_a =~ [frank, jim])
expect(TaggableModel.tagged_with('ji', wild: true, any: true).to_a).to match_array([frank, jim])
end
end

Expand Down