Skip to content

Instantly share code, notes, and snippets.

@rickenharp
Created May 12, 2016 09:04
Show Gist options
  • Save rickenharp/73930219a2f7cacbe62c05c98b6e40d7 to your computer and use it in GitHub Desktop.
Save rickenharp/73930219a2f7cacbe62c05c98b6e40d7 to your computer and use it in GitHub Desktop.
user_repositoy.rb
class UserRepository
include Hanami::Repository
def self.with_timezone
query do
ap self
join(:pg_timezone_names, foreign_key: :timezone, key: :name).order(:utc_offset)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment