Skip to content

Instantly share code, notes, and snippets.

@IcyMidnight
Created August 25, 2010 01:01
Show Gist options
  • Save IcyMidnight/548629 to your computer and use it in GitHub Desktop.
Save IcyMidnight/548629 to your computer and use it in GitHub Desktop.
Fix for Merb Slices using directory name as slice name
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