Skip to content

Instantly share code, notes, and snippets.

@mmiliaus
Created May 1, 2011 21:10
Show Gist options
  • Save mmiliaus/950877 to your computer and use it in GitHub Desktop.
Save mmiliaus/950877 to your computer and use it in GitHub Desktop.
# =stylesheet_include_tag
def stylesheet_include_tag(filename)
mtime = File.new(File.join(APP_PATH,"public","stylesheets","#{filename}.css")).mtime
%Q(<link rel="stylesheet", href="/stylesheets/#{filename}.css?#{mtime.to_i}"></link>)
end
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment