I want to find records in ActiveRecord that have an attribute that is either nil
or some value:
class Model < ActiveRecord::Base
end
class CreateModels < ActiveRecord::Migration
def self.up
create_table :models do |t|
t.string :some_property
end
end
def self.down
drop_table :models
end
end
Model.all(:conditions => ["some_property IN (?)"], [nil, "this value"])
How do I set that up?