Created
May 31, 2015 18:22
-
-
Save bradpauly/9be51f96d750add0f8c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
scope :in_time_zones, -> { |zones| where(time_zone_name: zones) } | |
def self.unique_time_zone_names | |
select("DISTINCT time_zone_name").pluck(:time_zone_name).compact | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment