Created
November 3, 2009 18:39
-
-
Save tdreyno/225308 to your computer and use it in GitHub Desktop.
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 find_and_include_related_sass_file | |
| path = request.path_info.dup | |
| path << self.class.index_file if path.match(%r{/$}) | |
| path.gsub!(%r{^/}, '') | |
| path.gsub!(File.extname(path), '') | |
| path.gsub!('/', '-') | |
| sass_file = File.join(File.basename(self.class.views), self.class.css_dir, "#{path}.css.sass") | |
| if File.exists? sass_file | |
| stylesheet_link_tag "#{path}.css" | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment