From 05794170f64f8bf250b34d2d594e368721009278 Mon Sep 17 00:00:00 2001 From: Abdelkader Boudih Date: Tue, 5 Jul 2016 19:07:46 +0000 Subject: [PATCH] Remove more deprecations --- acts-as-taggable-on.gemspec | 2 +- lib/acts_as_taggable_on/tagging.rb | 2 +- spec/acts_as_taggable_on/tag_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/acts-as-taggable-on.gemspec b/acts-as-taggable-on.gemspec index 65d0b8f54..5fc9e138b 100644 --- a/acts-as-taggable-on.gemspec +++ b/acts-as-taggable-on.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency 'activerecord', ['>= 4.0'] gem.add_development_dependency 'sqlite3' - gem.add_development_dependency 'mysql2', '~> 0.3.7' + gem.add_development_dependency 'mysql2', '~> 0.3' gem.add_development_dependency 'pg' gem.add_development_dependency 'rspec-rails' diff --git a/lib/acts_as_taggable_on/tagging.rb b/lib/acts_as_taggable_on/tagging.rb index b8802a4a5..93b77b988 100644 --- a/lib/acts_as_taggable_on/tagging.rb +++ b/lib/acts_as_taggable_on/tagging.rb @@ -7,7 +7,7 @@ class Tagging < ::ActiveRecord::Base #:nodoc: scope :owned_by, ->(owner) { where(tagger: owner) } scope :not_owned, -> { where(tagger_id: nil, tagger_type: nil) } - scope :by_contexts, ->(*contexts) { where(context: (contexts || 'tags')) } + scope :by_contexts, ->(contexts) { where(context: (contexts || 'tags')) } scope :by_context, ->(context = 'tags') { by_contexts(context.to_s) } validates_presence_of :context diff --git a/spec/acts_as_taggable_on/tag_spec.rb b/spec/acts_as_taggable_on/tag_spec.rb index ab15b97b4..392e0f929 100644 --- a/spec/acts_as_taggable_on/tag_spec.rb +++ b/spec/acts_as_taggable_on/tag_spec.rb @@ -66,7 +66,7 @@ end it 'should not return tags that have been used in other contexts' do - expect(ActsAsTaggableOn::Tag.for_context('needs').all.map(&:name)).to_not include('ruby') + expect(ActsAsTaggableOn::Tag.for_context('needs').pluck(:name)).to_not include('ruby') end end