Created
September 11, 2012 10:30
-
-
Save tmschndr/3697484 to your computer and use it in GitHub Desktop.
what's the most readable version? Or do know a even better solution? :)
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 Tweet < ActiveRecord::Base | |
before_save :check_location | |
def check_location | |
show_location = location? | |
end | |
end |
def location=val
write_attribute(:show_location, )
write_attribute(:location, val)
end
nahh. its all broken
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
show_location ist ein Attribute