similar to: acts_as_taggable Generating Funky SQL

Displaying 20 results from an estimated 900 matches similar to: "acts_as_taggable Generating Funky 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 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 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
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 May 06
3
Extending Rails plugins?
Gents, I''m using the acts_as_taggable rails plugin (not gem), and would like to add some additional methods to it. For example, the find_tagged_with methods essentially does a find tag in a list (effectively an OR), while I''d like to implement a find_tagged_with_all method that would implement an AND (so if I specified 4 tags, it would only return items that were
2006 May 07
6
Challenging SQL for you...
Gents, My heads been out of the sql game for too long (or it''s simply too early). I''m trying to extend the acts_as_taggable plugin (note: not gem) so that you can specify a list of tags you''re interested in, and the plugin will return only those items that are tagged with *all* these tags. The plugin uses primarily two tables: tags, to keep all the various tag
2006 Jul 14
5
Acts_As_Taggable Plugin multiple controllers.
I have Acts_As_Taggable Plugin working. I have a HR controller and a sales controller. I have a document in hr tagged whitepaper and a differnent document in sales tagged whitepaper when I am in hr I see the hr document tagged with whitepaper and not the sale document (what I want). but if I click on the tag whitepaper I return two documents, hr and sales. I just want to return the hr document
2006 Apr 21
3
polymorphic,has_many through can not work?
Josh Susser tells in his blog that the opposite direction of polymorphic will get into trouble together with has_many through. This is the url: http://blog.hasmanythrough.com/articles/2006/04/03/polymorphic-through I do that according to Josh Susser''s procedure: class Tagging < ActiveRecord::Base belongs_to :tag belongs_to :taggable, :polymorphic => true belongs_to
2006 Sep 27
1
acts_as_taggable with single-table inheritance?
Does anyone have any experience making this work? I installed the plugin and tried the following: class SomeClass < ActiveRecord::Base acts_as_Taggable end class SubClass1 < SomeClass end class SubClass2 < SomeClass end SubClass1.tag_with("tag") and notice that taggable_type = SomeClass when I do SubClass2.find_tagged_with("tag") a SubClass1 object is
2006 Aug 10
2
search acts_as_taggable for multiple tags
Hey...I''m trying to search a Model that uses acts_as_taggable for multiple tags. I''d like to pass in a search string containing a space delimited tags names (i.e. "tag1 tag2") and return the objects that have been tagged by either one of those. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Dec 20
4
undefined method `fullname' for #<User:0x357e380>, BUT works on first view?
Hi all, Please excuse the long post, but I wanted to make sure you have all the information.... I have a NewsModel that looks like this: class News < ActiveRecord::Base belongs_to :user validates_associated :user validates_length_of :title, :description, :minimum => 5, :allow_nil => false acts_as_commentable acts_as_taggable def self.find_recent News.find(:all,
2006 Apr 07
0
acts_as_taggable and tag list
Hi, I''m using the new acts_as_taggable on Rails 1.1.1. I would like to get a list of all the tags for a particular model type, in my case "Post". I got it to work with: Tag.find(:all,:include => :taggings, :conditions => "taggable_type=''Chunk''") But I''m wondering if there''s a more Rubyish elegant way. thanks, scott.
2006 Apr 20
5
acts_as_taggable patch 3866 needs some testing
DHH''s acts_as_taggable is now much more usable with this patch. http://dev.rubyonrails.org/ticket/3866 This patch adds scoped finders, documentation, and tests: # Get tags for all articles in a blog @blog.articles.tags # Get tags for articles in a blog published in the last year @blog.articles.tags :conditions => [''published_at > ?'', 1.year.ago] # Get related
2006 Apr 01
3
acts_as_taggable, wrong number of arguments
Hello, When I try: @tagged_items = Problem.find_tagged_with :all => ''kuba'' or @tagged_items = Problem.tags_count :limit => 100 I get this error: ArgumentError in Volume#index wrong number of arguments (2 for 3) RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace
2006 Dec 26
0
acts_as_taggable Plugin issue (not gem)
I tried to post this earlier, but it never came through. I''ve got something working in console, but not in controller. Any idea why? This is the plugin not the gem of acts_as_taggable *View* <code> <h1>Listing elements</h1> <% if @elements.blank? %> <p>There are currently no elements in the system tagged <%=
2006 Jun 02
1
Sorting records from acts_as_taggable plugin
I am using the acts_as_taggable plugin, which works rather nicely by the way. My question is this: When using find_tagged_with, how do I sort the resultant data? It is currently sorting based on the "id" of the record. For instance, I have posts, with tags. If I want to find all posts tagged with "RubyOnRails" it displays them, but not in chronological order, they are
2006 Nov 04
2
strange errors in dev.log and webserver log
Hi guys, I have encountered a strange error in one of my applications. The details are the following: The application is a very simple one, I have one model, Cards, it has some pretty basic stuff, some after_save methods for saving uploaded files to their places. I have an UI where I can manage the Card records, with the default methods, including ''edit'' cards_controller.rb:
2008 Jun 13
1
Polymorphic :through associations
Could someone please help me with this association scheme? I am familiar with habtm as well as the :through association but this one has me stumped. Here is an example DB. Tags Table: ------------------------- id name Taggables Table: -------------------------- id tag_id taggble_type taggable_id For purposes of this example say that there are 2 other tables that can be tagged and their model
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],
2006 Apr 04
5
How to implement tag clouds using plugin?
The code on http://blog.craz8.com/articles/2005/10/28/acts_as_taggable-is-a-cool-piece-of-code is based on the acts_as_taggable gem,anybody has done that using the acts_as_taggable plugin?thanks! btw:the code above uses the tag_count method,which is defined in the gem: def tags_count(options = {}) options = {:order => ''count DESC''}.merge(options)