Users have many invitations and Invitations belongs_to a User. In the
user model:
has_many :open_invitations,
:class_name => 'Invitation',
:conditions => "completed_at IS NULL AND is_closed = 'f'"
This works for SQLite3. But as a literal string this will fail if the
boolean values are different in another db system like MySQL, right?
How can I use a boolean in a condition that will work across all db
types?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---