Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request mbleigh#813 from mnrk/master
Browse files Browse the repository at this point in the history
Fixed Rails 5.1 deprecation message: Passing a class to the `class_name`...
  • Loading branch information
seuros committed Mar 21, 2017
2 parents 531a0c6 + aa2bfed commit 4efb3ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/acts_as_taggable_on/taggable/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ def initialize_acts_as_taggable_on_core
# the associations tag_taggings & tags are always returned in created order
has_many context_taggings, -> { includes(:tag).order(taggings_order).where(context: tags_type) },
as: :taggable,
class_name: ActsAsTaggableOn::Tagging,
class_name: 'ActsAsTaggableOn::Tagging',
dependent: :destroy

has_many context_tags, -> { order(taggings_order) },
class_name: ActsAsTaggableOn::Tag,
class_name: 'ActsAsTaggableOn::Tag',
through: context_taggings,
source: :tag
end
Expand Down
4 changes: 2 additions & 2 deletions lib/acts_as_taggable_on/tagger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ def acts_as_tagger(opts={})
has_many :owned_taggings, owned_taggings_scope,
opts.merge(
as: :tagger,
class_name: ::ActsAsTaggableOn::Tagging,
class_name: '::ActsAsTaggableOn::Tagging',
dependent: :destroy
)

has_many :owned_tags, -> { distinct },
class_name: ::ActsAsTaggableOn::Tag,
class_name: '::ActsAsTaggableOn::Tag',
source: :tag,
through: :owned_taggings
end
Expand Down

0 comments on commit 4efb3ee

Please sign in to comment.