Displaying 1 result from an estimated 1 matches for "coach_appl".
2012 Jul 25
3
rails scope without raw sql
...ll the records where the
application_sate value is not equal to the string "archived".
This works fine locally, but in the Heroku logs it throws up the
following error :
ActionView::Template::Error (PG::Error: ERROR: column "archived" does
not exist
SELECT COUNT(*) FROM "coach_applications" WHERE
"coach_applications"."user_id" = 10 AND (application_state !=
"archived")):
It''s looking for a column archived, which is not what I want.
Essentially what I want is a proper Rails ORM style scope that returns
the rows in a db where the v...