hi,
I have problems with default values. I don't know whether I'm stupid or doc is not good (you're not supposed to answer) but I spend a lot of time for trivial things.
According to Wiki RailsBestPractices, it's a good idea to add a default value like that:
When I try to add a default value, I get an error:PHP Code:def self.custom_find( id_to_find = 1 )
...
end
[edit: the query is ok without = 0 default value ]
parse error, unexpected ')', expecting '='PHP Code:def self.find_query(category, type, city_id, price_min = 0, price_max)
find(:all,
sql conditions coming here...)
end
Did I miss something?



) but I spend a lot of time for trivial things.

cat, :type, :city_id, ????, 100)
Bookmarks