Skip to content

Commit

Permalink
Merge pull request #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 authored Mar 21, 2017
2 parents 5163a75 + d6c8d81 commit 9bb5738
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 9bb5738

Please sign in to comment.