Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 4aa1d971da4407f2e27f978cdbf62e15faadbbe5 1 parent 55f54a0
@dcu dcu authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.