Currently I am upgrading my application to rails 4.i know there are some syntax changes made for writing scopes in rails4 for SQL statement. below is the scope in rails 3:
scope :current_active_leases, group("leases.id").where("leases.commencement <= ? and (leases.expiration >= ? or leases.mtm=?) and leases.is_executed= ? ", Time.now.strftime("%Y-%m-%d"), Time.now.strftime("%Y-%m-%d"), true, true)
how to rewrite this in rails 4