Created
August 25, 2010 01:01
-
-
Save IcyMidnight/548629 to your computer and use it in GitHub Desktop.
Fix for Merb Slices using directory name as slice name
This file contains 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
if File.exists?(slice_name_file = File.join(__DIR__, 'slice_name')) | |
contents = '' | |
file = open(slice_name_file, "r") | |
file.each_line do |line| | |
contents += line | |
end | |
file.close | |
contents.strip! | |
slice_name = contents unless contents.empty? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment