I followed these instructions to check whether a user has been soft-deleted or not when logging in. In the example below I can check for a boolean value:
Class User < ActiveRecord::Base
def self.find_for_authentication(conditions)
super(conditions.merge(:deleted_flag => false))
end
I would prefer a timestamp (created_at) field. How can I check whether such a field is empty? The database throws errors for the following checks:
super(conditions.merge(:deleted_at => false)) # also tried nil, "NULL" and "IS NULL"