It is better to only allow where on known attributes by default. There should an optional parameter to search on unknown attributes.
Person.where :name => "x"
#will fail if name is not a known attribute (DSL declared)
Person.where :name => "x"
#will work just fine if :name has been declared
Person.where :name => "x", :only_known => False
#will not fail if name has not been declared.
It is better to only allow
where
on known attributes by default. There should an optional parameter to search on unknown attributes.