# File lib/acts_as_taggable_on/acts_as_taggable_on/related.rb, line 37 def acts_as_taggable_on(*args) super(*args) initialize_acts_as_taggable_on_related end
# File lib/acts_as_taggable_on/acts_as_taggable_on/related.rb, line 10 def initialize_acts_as_taggable_on_related tag_types.map(&:to_s).each do |tag_type| class_eval def find_related_#{tag_type}(options = {}) related_tags_for('#{tag_type}', self.class, options) end alias_method :find_related_on_#{tag_type}, :find_related_#{tag_type} def find_related_#{tag_type}_for(klass, options = {}) related_tags_for('#{tag_type}', klass, options) end, __FILE__, __LINE__ + 1 end unless tag_types.empty? class_eval def find_matching_contexts(search_context, result_context, options = {}) matching_contexts_for(search_context.to_s, result_context.to_s, self.class, options) end def find_matching_contexts_for(klass, search_context, result_context, options = {}) matching_contexts_for(search_context.to_s, result_context.to_s, klass, options) end, __FILE__, __LINE__ + 1 end end
[Validate]
Generated with the Darkfish Rdoc Generator 2.