Created
March 4, 2009 19:13
-
-
Save maciej/73951 to your computer and use it in GitHub Desktop.
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 Picture < ActiveRecord::Base | |
def self.new_from_flickr_photo(photo) | |
picture = Picture.new | |
picture.set_attributes_from_flickr_photo(photo) | |
picture | |
end | |
def set_attributes_from_flickr_photo(photo) | |
# copy whichever attributes you might need | |
end | |
def flickr_photo(flickr) | |
# re-create the photo-object | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment