Rails4 ActiveRecord has_one :conditions key removed
问题 I am converting a RoR3.2 app to v4.2. In some models we have this construct: # A correspondent can have only one currently active client role or # it may have none. has_one :active_client, :class_name => 'Client', :conditions => IsActiveRow I am getting this error: Unknown key: :conditions. Valid keys are: :class_name, :class, :foreign_key, :validate, :autosave, :dependent, :primary_key, :inverse_of, :required, :as, :foreign_type (ActionView::Template::Error) Which is raised here: /home