Skip to content

Instantly share code, notes, and snippets.

@sekharp
Last active April 2, 2019 20:56
Show Gist options
  • Save sekharp/5b4ac1b5df794d325dc3f87f7815d098 to your computer and use it in GitHub Desktop.
Save sekharp/5b4ac1b5df794d325dc3f87f7815d098 to your computer and use it in GitHub Desktop.
class RetailerAccountRepository < Repository[:retailer_accounts]
def find_by_account_id(account_id)
retailer_accounts.where(Sequel[:retailer_accounts][:account_id] => account_id)
end
def find_by_retailer_id(id)
retailer_accounts.where(retailer_id: id)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment