search for: get_tag_list

Displaying 1 result from an estimated 1 matches for "get_tag_list".

Did you mean: set_tag_list
2009 Jan 01
1
HasManyThroughCantAssociateNewRecords Exception
I have a model: class Video < ActiveRecord::Base has_many :video_tags has_many :video_types has_many :tags, :through => :video_tags, :uniq => :true has_many :types, :through => :video_types, :uniq => :true def get_tag_list(delimiter) tags.collect { |t| t.tag }.join(delimiter) end def set_tag_list(tag_list, delimiter) # doesn''t remove old tags tag_list.split('','').each do |t| tags << Tag.find_or_create_by_tag(t) end end end When I call @video.set_tag_list(p...