Skip to content

Instantly share code, notes, and snippets.

@klochner
Created December 14, 2010 00:56
Show Gist options
  • Save klochner/739860 to your computer and use it in GitHub Desktop.
Save klochner/739860 to your computer and use it in GitHub Desktop.
#models/user.rb
def user_city
read_attribute(:user_city) || address && address.city || ""
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment