Topic: Add additional key field to acts_as_taggable..works, but not quite?
I've been able to add another field to my Tag table in acts_as_taggable.rb with the following code.
def tag_with(list, portal_id)
Tag.parse(list).each do |name|
send(acts_as_taggable_options[:from]).tags.create(:name => name, :portal_id => portal_id).on(self)
Tag.create(:name => name, :portal_id => portal_id).on(self)
I didn't quite get this right as I need to make Tag a 'belongs_to' member of the @portal table. Instead of adding the 'portal_id' in this routine (which is the correct FK) I really need to add records as @portal.tags.create(fields go here).
I hope to someday see this issue more clearly, but today I don't see where or how I make TAG a child of the PORTAL (has_many :tags) table?
I read my Rails books everyday and know I stumble often, but this level of complexity escapes me. As always, thanks for any revelations.