Using Merge in Active Record Queries