Joris
Not a member
Joris's latest activity
Friday, July 31 2009
2974
Add find :unique to ActiveRecord
was updated
in Ruby on Rails
-
Joris commented at 12:00 PMHaving 2 queries would be a waste of db calls. If you expect 1 row, there's no need to do a count.
All queries for something with a unique index / natural key i...
Thursday, July 30 2009
2974
Add find :unique to ActiveRecord
was updated
in Ruby on Rails
-
Joris commented at 4:01 PMSo, I read the bar at the right :)
So, I didn't test this, I just typed it here, so I'm not sure if my manual diff is ok. anyway.. here's the code:In base.rb f...
-
Joris commented at 3:57 PMSo, I read the bar at the right :)
So, I didn't test this, I just typed it here, so I'm not sure if my manual diff is ok. anyway.. here's the code:In base.rb f...
-
Joris created the ticket at 3:46 PMThe current method of getting the result of a query is find :fisrt.
This will essentially do a query with max 1 row.However, sometimes a developer creates a qu...