module ActsAsTaggableOn::Taggable::Ownership::ClassMethods

Public Instance Methods

acts_as_taggable_on(*args) click to toggle source
Calls superclass method
# File lib/acts_as_taggable_on/taggable/ownership.rb, line 14
def acts_as_taggable_on(*args)
  initialize_acts_as_taggable_on_ownership
  super(*args)
end
initialize_acts_as_taggable_on_ownership() click to toggle source
# File lib/acts_as_taggable_on/taggable/ownership.rb, line 19
      def initialize_acts_as_taggable_on_ownership
        tag_types.map(&:to_s).each do |tag_type|
          class_eval <<-RUBY, __FILE__, __LINE__ + 1
            def #{tag_type}_from(owner)
              owner_tag_list_on(owner, '#{tag_type}')
            end
          RUBY
        end
      end