Last active
December 14, 2015 02:59
-
-
Save evie404/5017676 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 Photo < ActiveRecord::Base | |
#... | |
def image_url *args | |
url = super | |
url.gsub!('.', '@2x.') if args[0] == :square_thumb #add @2x to filename if square_thumb is requested | |
url | |
end | |
#... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment