Skip to content

Commit

Permalink
Remove more deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
seuros committed Jul 5, 2016
1 parent 09ad6ca commit 0579417
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion acts-as-taggable-on.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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'
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 @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/acts_as_taggable_on/tag_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0579417

Please sign in to comment.