-
-
Save michaeldhopkins/004ac65c67eb446017c3 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
belongs_to :user, :dependent => :destroy | |
geocoded_by :full_street_address | |
after_validation :geocode, :if => :full_street_address | |
def full_street_address | |
self.user.profile.full_street_address | |
end |
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
belongs_to :user, :dependent => :destroy | |
geocoded_by :full_street_address | |
after_validation :geocode, :if => :full_street_address | |
def full_street_address | |
"#{address1} #{address2}, #{city}, #{state} #{zip}" | |
end |
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
has_one :profile | |
has_many :items |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment