search for: t_fk

Displaying 4 results from an estimated 4 matches for "t_fk".

Did you mean: t_f8
2006 Apr 04
5
How to implement tag clouds using plugin?
...le 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) o, t, o_pk, o_fk, t_pk, t_fk = table_name, tag_model.table_name, primary_key, taggable_foreign_key, tag_model.primary_key, tag_foreign_key jt = tags_join_model ? tags_join_model.table_name : tags_join_table sql = "SELECT #{t}.#{t_pk} AS id, #{t}.name AS name, COUNT(*) AS count FROM #{jt}, #{o}, #{...
2006 Feb 13
0
count_as_taggable distinctly
...tor => '' '' }.merge(options) tag_names = ActiveRecord::Acts::Taggable.split_tag_names(options[:any] || options[:all], options[:separator]) raise "No tags were passed to :any or :all options" if tag_names.empty? o, o_pk, o_fk, t, t_pk, t_fk, jt = set_locals_for_sql sql = "SELECT COUNT(DISTINCT #{o}.#{o_pk}) FROM #{jt}, #{o}, #{t} WHERE #{jt}.#{t_fk} = #{t}.#{t_pk} AND (#{t}.name = ''#{tag_names.join("'' OR #{t}.name=''")}'') AND #{o}.#{o_pk} = #...
2006 Feb 28
0
acts_as_taggable vulnerable to attacks ?
...= {}) options = { :separator => '' '' }.merge(options) tag_names = ActiveRecord::Acts::Taggable.split_tag_names(options[:any] || options[:all], options[:separator]) raise "No tags were passed to :any or :all options" if tag_names.empty? o, o_pk, o_fk, t, t_pk, t_fk, jt = set_locals_for_sql sql = "SELECT #{o}.* FROM #{jt}, #{o}, #{t} WHERE #{jt}.#{t_fk} = #{t}.#{t_pk} AND (#{t}.name = ''#{tag_names.join("'' OR #{t}.name=''")}'') AND #{o}.#{o_pk} = #{jt}.#{o_fk}" ... end Notice tag_names i...
2006 Mar 21
2
SQL bug in acts_as_taggable
...and feel free to ingore it in case. I''m using acts_as_taggable (the gem version) and found what to me looks like a bug in this code from the method tags_count: sql = "SELECT #{t}.#{t_pk} AS id, #{t}.name AS name, COUNT (*) AS count FROM #{jt}, #{o}, #{t} WHERE #{jt}.#{t_fk} = #{t}.#{t_pk} AND #{jt}.#{o_fk} = #{o}.#{o_pk}" sql << " AND #{sanitize_sql(options[:conditions])}" if options[:condit ions] sql << " GROUP BY #{t}.name" My database (PostgreSQL 8) laments that the ''tags.id...