ambition: Less than and greater than cause stack trace
Reported by Louis Rose | August 30th, 2007 @ 01:55 PM
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:in
extract_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:in
process_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:in
process'
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:in
process'
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:in
send'
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:in
error_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:in
to_s'
from
./script/../config/../config/../vendor/plugins/ambition-0.1.4/lib/ambition/query.rb:70:in
keyed_clauses' from (irb):56:in
inject' 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:in
inject'
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:in
to_sql'
Comments and changes to this ticket
-
Chris Wanstrath August 30th, 2007 @ 01:59 PM
- 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 ยป