Skip to content

Instantly share code, notes, and snippets.

@jxpx777
Created January 26, 2011 23:01
Show Gist options
  • Save jxpx777/797700 to your computer and use it in GitHub Desktop.
Save jxpx777/797700 to your computer and use it in GitHub Desktop.
User model
(ActionView::Template::Error) "invalid byte sequence in UTF-8"
-------------------------------
Backtrace:
-------------------------------
activesupport (3.0.3) lib/active_support/core_ext/object/blank.rb:68:in `=~'
activesupport (3.0.3) lib/active_support/core_ext/object/blank.rb:68:in `!~'
activesupport (3.0.3) lib/active_support/core_ext/object/blank.rb:68:in `blank?'
app/models/user.rb:57:in `city_and_state'
activerecord (3.0.3) lib/active_record/associations/association_proxy.rb:218:in `method_missing'
def city_and_state
result = []
result << city.to_s unless city.blank?
result << self.displayable_state unless self.displayable_state == ""
return result * ", "
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment