acts-as-taggable-on and friendly_id together
Need slug for tags?
Put code below into config/initializers
ActsAsTaggableOn::Tag.class_eval do
extend FriendlyId
friendly_id :name, :use => :slugged
end
and don't forget add slug column to tags table
you can find it here https://github.com/maciekkossuda/initializers
Written by Maciej Kossuda
Related protips
1 Response
Beautifully done...Nice :)
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#