Skip to content
Browse files

Use haml ugly syntax by default on production env

With this change rendering haml on production is faster and will take
less bandwidth since the generated document is smaller.
  • Loading branch information...
1 parent 55f54a0 commit 4aa1d971da4407f2e27f978cdbf62e15faadbbe5 @dcu dcu committed Aug 19, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 padrino-core/lib/padrino-core/application.rb
View
5 padrino-core/lib/padrino-core/application.rb
@@ -181,6 +181,11 @@ def default_configuration!
set :views, Proc.new { File.join(root, "views") }
set :images_path, Proc.new { File.join(public, "images") }
set :protection, false
+ # haml engine
+ if Padrino.env == :production && defined?(Haml)
+ set :haml, {:ugly => true}
+ end
+
# Padrino specific
set :uri_root, '/'
set :app_name, settings.to_s.underscore.to_sym

0 comments on commit 4aa1d97

Please sign in to comment.
Something went wrong with that request. Please try again.