Skip to content

Instantly share code, notes, and snippets.

@maylogger
Created September 7, 2012 03:03
Show Gist options
  • Select an option

  • Save maylogger/3662727 to your computer and use it in GitHub Desktop.

Select an option

Save maylogger/3662727 to your computer and use it in GitHub Desktop.
module ViewHelpers
def placekitten(size, options={})
domain = options[:domain] || "http://placekitten.com"
src = "#{domain}/#{size}"
g = options[:g]
if options[:g]
src = "#{domain}/g/#{size}"
end
src
end
end
include ViewHelpers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment