search for: find_by_tag

Displaying 2 results from an estimated 2 matches for "find_by_tag".

2006 Nov 07
2
find_by_tag
What exactly is find_by_tag for? The rails documentation doesn''t really give a description of what it does. I tried doing a search for find_by_tag (and find_all_by_tag), but nothing turned up. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this messa...
2005 May 23
1
has_and_belongs_to_many dual insert error ?
....tags.each {|tag| self.tags.delete(tag) unless tags.include?(tag.tag) } end def reject_existing_tags(tags) self.tags.each { |tag| tags.delete tag.tag.downcase } end def add_tags_to_picture(tags) tags.each do |name| tag = Tag.find_by_tag(name.downcase) || Tag.create(''tag'' => name.downcase) self.tags.push(tag) end end end class Tag < ActiveRecord::Base has_and_belongs_to_many :pictures def to_s() self.tag.capitalize end def ==(other) return self.tag...