ambition: Less than and greater than cause stack trace
Reported by Louis Rose | 2007-08-30 13:55:27 UTC
When constructing a query using something like the following, I receive a stack trace, after calling to_sql or to_hash on the query object:
@@@ Ruby Property.select { |p| p.rent >= 300 }
A similar query, such as the following does not produce a stack trace:
@@@ Ruby
Property.select { |p| p.rent > 300 }
And here's that stack trace:
RuntimeError: No reflection rent' found on Property from
./script/../config/../config/../vendor/plugins/ambition-0.1.4/lib/ambition/processor.rb:63:inextract_includes'
from
./script/../config/../config/../vendor/plugins/ambition-0.1.4/lib/ambition/where.rb:147:in
translation' from
./script/../config/../config/../vendor/plugins/ambition-0.1.4/lib/ambition/where.rb:42:inprocess_call'
from
/var/lib/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:241:in
send' from
/var/lib/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:241:inprocess'
from
/var/lib/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:299:in
error_handler' from
/var/lib/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:240:inprocess'
from
./script/../config/../config/../vendor/plugins/ambition-0.1.4/lib/ambition/processor.rb:28:in
process_proc' from
/var/lib/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:241:insend'
from
/var/lib/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:241:in
process' from
/var/lib/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:299:inerror_handler'
from
/var/lib/gems/1.8/gems/ParseTree-2.0.1/lib/sexp_processor.rb:240:in
process' from
./script/../config/../config/../vendor/plugins/ambition-0.1.4/lib/ambition/processor.rb:45:into_s'
from
./script/../config/../config/../vendor/plugins/ambition-0.1.4/lib/ambition/query.rb:70:in
keyed_clauses' from (irb):56:ininject' from
./script/../config/../config/../vendor/plugins/ambition-0.1.4/lib/ambition/query.rb:68:in
each' from
./script/../config/../config/../vendor/plugins/ambition-0.1.4/lib/ambition/query.rb:68:ininject'
from
./script/../config/../config/../vendor/plugins/ambition-0.1.4/lib/ambition/query.rb:68:in
keyed_clauses' from
./script/../config/../config/../vendor/plugins/ambition-0.1.4/lib/ambition/query.rb:55:into_sql'
Comments and changes to this ticket
-

Chris Wanstrath 2007-08-30 13:59:56 UTC
- State changed from new to resolved
Crap!
Fixed in http://projects.require.errthebl...
Just pushed out the 0.1.5 gem, expect it soon. Thanks!
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป