Displaying 2 results from an estimated 2 matches for "set_locals_for_sql".
2006 Feb 13
0
count_as_taggable distinctly
...#39;' '' }.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} = #{jt}.#{o_fk}"...
2006 Feb 28
0
acts_as_taggable vulnerable to attacks ?
...ions = { :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 is directly interpolated i...