Created
January 17, 2015 00:46
-
-
Save mikekreeki/3a202946b7ebacfff8ee to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Client | |
belongs_to :country, counter_cache: true | |
def country_code=(country_code) | |
self.country = Country.by_code country_code | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment