Displaying 7 results from an estimated 7 matches for "join_class_name".
2006 Jan 20
6
HELP: acts_as_taggable problem with :clear => true
...9;': UPDATE items_tags SET item_id =
NULL WHERE (item_id = 2 AND id IN (NULL,NULL,NULL,NULL,NULL,NULL,NULL))
Any ideas ?
My call to tags (in update method in controller) is like this
@item.tag(params[:tags], :clear => true )
Acts_as_taggable is invoked like this
acts_as_taggable :join_class_name => ''ItemTag'', :join_table =>
''items_tags''
i.e. my link table and join_class follow the usual rails conventions,
not the usual acts_as_taggable conventions.
Thanks in advance for any help,
Andy
--
Posted via http://www.ruby-forum.com/.
2005 Dec 28
3
acts_as_taggable query
...and now want to use this plugin but I just cant seem to figure
out how to make it use my table instead of the default.
class Tag < ActiveRecord::Base # already exists and has the required fields
like name, id & an items (counter)
end
class Item < ActiveRecord::Base
acts_as_taggable :join_class_name ''Itemtag'' # should I use join_table here?
end
class Itemtag <ActiveRecord::Base
set_table_name ''itemtags'' # note that this is different from the default
conention of tags_items
end
With the above settings I thought that the plugin would use the table I hav...
2006 Apr 10
2
acts_as_taggable with only 1 taggings table
...el, like this:
tags
photos
tags_photos
Which means I need one new table for each model I want to tag.
Isn''t there a way to use only 1 table with the taggings, to have a
centralized table for all kinds of items I want to tag?
I read the documentation and I think its possible using the
join_class_name option, but I didn''t manage to work it out. Can anyone
please explain how its done, and please don''t forget how the table
structure works.
Thanks
--
Posted via http://www.ruby-forum.com/.
2005 Sep 03
13
acts_as_taggable v2 - Tagging on Steroids
Hi folks,
Thanks to the community feedback on the 1st version, I''ve come up with a
much improved version of the acts_as_taggable mixin.
ThereĀ“s some piece of the action here:
http://dema.ruby.com.br/articles/2005/09/03/tagging-on-steroids-with-rails
Cheers
Dema
--
http://dema.ruby.com.br - Rails from a .NET perspective
2005 Oct 17
0
acts_as_taggable and per-user tags
...-----------------------------------------------------------
class Resource < ActiveRecord::Base
belongs_to :user
validates_presence_of :filename
validates_uniqueness_of :filename, :message => "already exists, try
uploading another file or deleting first."
acts_as_taggable :join_class_name => ''TagResource''
-------------------------------------------------------------------------------------------------
class TagResource
belongs_to :user
end
-------------------------------------------------------------------------------------------------
class ResourcesContro...
2006 Jan 22
2
acts_as_taggable: weird SQL problem with untagging
Setup as follows:
class Resource < ActiveRecord::Base
belongs_to :user
validates_presence_of :filename
validates_uniqueness_of :filename, :scope => "user_id",
:message => "already exists, try uploading another file or deleting first."
acts_as_taggable :join_class_name => ''TagResource''
---------------------------------------------------------------------------------------------------
class TagResource
belongs_to :user
end
---------------------------------------------------------------------------------------------------
And I''m...
2006 Mar 19
1
some strange behavior for has_many with STI
...ich can have comments. Here are the model associations for Events,
Activities and Comments:
class Activity < ActiveRecord::Base
belongs_to :user
has_many :comments, :conditions => "type = ''Activity''", :foreign_key
=> "type_id"
acts_as_taggable :join_class_name => "TagActivity"
class Event < ActiveRecord::Base
include EventMatching
belongs_to :activity_type
has_and_belongs_to_many :users
has_many :comments, :conditions => "type = ''Event''", :foreign_key => "type_id"
class Comment < Ac...