search for: to_named_condit

Displaying 2 results from an estimated 2 matches for "to_named_condit".

2006 Apr 16
3
variable variables?
Hi everyone, Does Ruby support variable variables like PHP (http://www.php.net/manual/en/language.variables.variable.php)? Or do I have to use eval, like some_hash.each_pair{|key, pair| eval "#{key} = #{value}" } Or is there some other way? I''m actually trying to figure this out in order to use ez_where to create its conditions from a hash, so if this isn''t even
2006 Feb 23
8
SQL quoting for :order parameter
When I construct a query using variables I do something like this: @users = User.find(:all, :conditions => ["location = ?", location]) I would like to do the same sort of thing in the :order parameter. @users = User.find(:all, :order => ["? ASC", location]) When I try this though I get a SQL error and I see that the items in the array were concatenated together and