Symbol ":registered" causes .where clause to fail with 'can't convert Array into String'
Reported by Tim Griffin | September 20th, 2011 @ 05:11 PM | in Hobo 1.3 (Rails 3)
For some reason, using the current Hobo master version (as of 18
Sep 2011) under Rails 3.0.7, this statement
@instruments = Document.where(:state => [:registered])
causes the error
can't convert Array into String
Instead, I find I have to do this, and all is well.
where("state IN (?)", ['registered'])
It seems to be something particular with the word "registered". Any ideas?
Tim
Comments and changes to this ticket
-
Matt Jones September 22nd, 2011 @ 04:13 AM
- Milestone set to Hobo 1.3 (Rails 3)
- Milestone order changed from 197983 to 0
-
Matt Jones September 22nd, 2011 @ 02:17 PM
- State changed from new to open
I can't reproduce this on the current version with Rails 3.0.10. Can you post a complete stack trace?
-
Tim Griffin September 22nd, 2011 @ 06:07 PM
Hah! With a pull of Hobo master today (22 Sep 2011) (and still under Rails 3.0.7), I can no longer reproduce this either. I wonder what fixed it? Oh well, water under the bridge.
Thanks, Matt.
T -
Matt Jones September 22nd, 2011 @ 09:49 PM
- State changed from open to resolved
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 ยป