Skip to content

Instantly share code, notes, and snippets.

@pavenuto
Created November 7, 2013 15:36
Show Gist options
  • Save pavenuto/7356615 to your computer and use it in GitHub Desktop.
Save pavenuto/7356615 to your computer and use it in GitHub Desktop.
Fill Murray image placeholder Ruby Helper
# Fill Murray Placeholder Images
# example: <%= image_tag fill_murray('400x300') %>
def fill_murray(dimensions, grayscale=false)
width, height = dimensions.split("x")
if grayscale == true
'http://fillmurray.com/g/' + width + '/' + height
else
'http://fillmurray.com/' + width + '/' + height
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment