Skip to content

Instantly share code, notes, and snippets.

@tmschndr
Created September 11, 2012 10:30
Show Gist options
  • Save tmschndr/3697484 to your computer and use it in GitHub Desktop.
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? :)
class Tweet < ActiveRecord::Base
before_save :check_location
def check_location
show_location = location?
end
end
@DonSchado
Copy link

show_location ist ein Attribute

@kangguru
Copy link

def location=val
write_attribute(:show_location, )
write_attribute(:location, val)
end

@kangguru
Copy link

nahh. its all broken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment