Created
May 27, 2014 19:59
-
-
Save phillipoertel/a7589eee4d3953c0eff5 to your computer and use it in GitHub Desktop.
pi_images_refactoring.rb
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 PortfolioItem | |
# | |
# alt | |
# | |
#has_attached_file :teaser, styles: { tile: ["555x>", :jpg] } | |
# | |
# neu | |
# | |
has_many :images | |
def uploaded_tile_image | |
images.find_by_type(:teaser) | |
end | |
def uploaded_tile_image=(new_image) | |
images.... = new_image | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment