I am upgrading a Rails 3 app to rails 5.1. In Rails-3 model I have a condition like
has_one :current_contract, :class_name => 'Contract',
:conditions => Proc.new { "contract_vw.country = '#{country_id}'"
if country_id }
I guess previous developer follow this hack
I am not sure how to convert it to Rails 5.1
Any help appreciated.