-
-
Save Jauny/1deedd869110bb8d2efc 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
class User < ActiveRecord::Base | |
attr_accessible :name, :email, :picture | |
def self.picture | |
super || default_picture | |
end | |
private | |
def default_picture | |
"http://i.imgur.com/I1B7x.gif" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment