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

Fixed Rails 5.1 deprecation message: Passing a class to the class_name... #813

Merged
merged 1 commit into from
Mar 21, 2017
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
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