Created
December 6, 2013 19:58
-
-
Save JamesDullaghan/7831164 to your computer and use it in GitHub Desktop.
base64
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
def sticker_image_path | |
src = "data:image/png;base64," | |
src += ActiveSupport::Base64.encode64(File.read("#{Rails.root}/app/assets/images/courses/#{self.slug}-sticker.png")) | |
src | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment