similar to: acts_as_taggable and per-user tags

Displaying 20 results from an estimated 1000 matches similar to: "acts_as_taggable and per-user tags"

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''
2006 Jan 20
6
HELP: acts_as_taggable problem with :clear => true
I''ve got the basics of acts_as_taggable going, but I now want to use :clear => true on the tags method, because the tags I''m supplying as parameters are the complete set of tags for the item, not additions to existing tags. Problem is, that gives me a nasty SQL error ... Unknown column ''id'' in ''where clause'': UPDATE items_tags SET
2006 Apr 26
3
acts_as_taggable gem: deleting tags
I have the following quick-and-dirty hack in my model: def after_destroy # search for orphaned tags and delete them orphans = Resource.tags_count :count => ''= 0'' orphans.keys.each {|tag| Tags.find_by_name(''tag'').destroy} end It''s nice from a readable code perspective, but it seems inefficient - is there some way to do this with only one
2006 Aug 29
1
acts_as_taggable question
Hi folks, I was using the acts_as_taggable gem in my application. However recently I accidentally ran gem install acts_as_taggable and now my application is giving errors complaining about missing tables resources_tags Before running the gem install command, I had tables named as tags_resources. Why am I now getting these errors? Has there been a change in acts_as_taggable gem? Why would it
2006 Jun 30
0
find_by_sql not quoting properly (in acts_as_taggable plugin)
I have run into a very strange problem discovered through the use of the acts_as_taggable plugin, but related to quoting/sanitizing the interpolated list in a find_by_sql. Apologies for the length, but I wanted to be complete. ;-) The method from acts_as_taggable.rb is: def find_tagged_with(list) find_by_sql(["SELECT #{table_name}.* FROM #{table_name}, tags,
2006 Apr 10
2
acts_as_taggable with only 1 taggings table
I was reading rails recipes and it shows how to use acts_as_taggable with only 2 tables, a tags and a taggings table. But I think that its related to an older acts_as_taggable version because now it seems that it works with one tags table and one taggings table for each tagable model, like this: tags photos tags_photos Which means I need one new table for each model I want to tag.
2006 Feb 16
1
[PATCH] acts_as_taggable plugin
hi, I started today to use the acts as taggable plugin and it''s working as expected. I added a method find_tagged_with_all since I needed to find the elements tagged with all the items in a list while find_tagged_with finds all the elements tagged with any of the list terms. Attached to this mail there''s a patch which adds the find_tagged_with_all method and which solves a
2005 Dec 28
3
acts_as_taggable query
Hi , I couldnt find any mailing list for this nice plugin so I hope this is not off topic.I just have a basic question here. I already had created a table and a model for the tags and items and the join table 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
2006 Mar 28
2
add_limit (in acts_as_taggable) breaks in 1.1, solution?
Upgraded from Rails 1.0 to 1.1 and found that the (slightly modified) acts_as_taggable plugin breaks. The line add_limit!(sql, options) (in the tags_count method) causes this error wrong number of arguments (2 for 3) The documentation still says it takes two args, so I''m not sure what''s wrong. Adding logger.info("SQL here: " + sql)
2006 Feb 09
3
acts_as_taggable Produces Bad SQL - Find Fails
I am using acts_as_taggable in my application and on the tagging side of things, no problem at all. Running edge Rails and PostgreSQL 8.1. I am then trying to find all my AR objects with a certain tag. The tag is: lasvegas and I know that there are at least 3 records with that tag. So, I''m doing this: @lists = List.find_tagged_with :any => @search_string, :separator =>
2006 Jan 30
2
:condition not being applied
I am using acts_as_taggable and everything seems to be working except that :condition => "tags_resources.portal_id=#{portal_id}" is not being applied. @resource_pages = Paginator.new self, Resource.find_tagged_with(:any => tag, :condition => "tags_resources.portal_id=#{portal_id}").length, 25, @params[''page'']; @resources
2006 Jan 22
1
direct sql "delete from"
I was thinking, if I don''t manage to figure out the problem with acts_as_taggable, that I could untag objects via a direct SQL DELETE on the tag join table (something like "where tag_id = tag_to_delete and user_id = current_user"). Are there any dangers to this approach? martin
2005 Sep 06
6
strange behavior of acts_as_taggable
I was testing my models with this new library and I got: >> s.tag "warp" ActiveRecord::StatementInvalid: ERROR: inserción o actualización en la tabla «tags_stories» viola la llave foránea «tags_stories_story_id_fkey» DETAIL: La llave (story_id)=(8) no está presente en la tabla «stories». : INSERT INTO tags_stories ("tag_id", "story_id") VALUES
2006 Nov 11
0
acts_as_taggable plugin - paging through tagged model
Hi, I''m using the acts_as_taggable plugin & wanted to page through all a model''s records taggged with a particular tags. i.e. page through all Model records that have been tagged with "artist" I could not work out how to do this with the plugin, so I made the changes outlined below. Did I need to do this..? & does anyone else find this useful?
2006 Feb 09
0
acts_as_taggable Generating Funky SQL
I am using acts_as_taggable in my application and on the tagging side of things, no problem at all. Running edge Rails and PostgreSQL 8.1. I am then trying to find all my AR objects with a certain tag. The tag is: lasvegas and I know that there are at least 3 records with that tag. So, I''m doing this: @lists = List.find_tagged_with :any => @search_string, :separator =>
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
2006 Feb 28
0
acts_as_taggable vulnerable to attacks ?
Hi all ! I''d like to confirm if I''m reading correctly. It seems ActiveRecord::Acts::Taggable::SingletonMethods#find_tagged_with is vulnerable to SQL injection attacks: def find_tagged_with(options = {}) options = { :separator => '' '' }.merge(options) tag_names = ActiveRecord::Acts::Taggable.split_tag_names(options[:any] || options[:all],
2005 Dec 16
1
acts_as_taggable sql injection vulnerability
Hey everyone! If you''re using acts_as_taggable <= 1.04, (erm, any version, I think..) please fix your local copy right now! There are numerous sql sanitization holes in this library. I notified Obie of this over a month ago, so hopefully he''s fixed it. How to tell lif you''re vulnerable ====================== Make a tag with a single quote in it. See if raises an
2006 Apr 17
6
acts_as_taggable confused
Ahoy, So i''ve installed the acts_as_taggable module and everything is fine, but i''m a bit confused about this bit of code described in the API "photo = Photo.new # splits and adds to the tags collection photo.tag "wine beer alcohol" # don''t need to split since it''s an array, but replaces the tags collection # trailing and leading
2005 Sep 13
5
acts_as_taggable 1.0.4 now gemified!
Hi Folks, The acts_as_taggable mixin is now available as a shiny gem. More details here: http://dema.ruby.com.br/articles/2005/09/13/acts-as-taggable-gemified This release features some cool additions as well. Cheers Dema -- http://dema.ruby.com.br - Rails from a .NET perspective