Revert "remove old code for rails 3x and update haml dependency"
This commit is contained in:
parent
d064e8d55e
commit
4ef4dedfaf
|
@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|||
s.rubyforge_project = "haml-rails"
|
||||
s.required_rubygems_version = ">= 1.3.6"
|
||||
|
||||
s.add_dependency "haml", [">= 4.0.6", "< 5.0"]
|
||||
s.add_dependency "haml", [">= 3.1", "< 5.0"]
|
||||
s.add_dependency "activesupport", [">= 4.0.1"]
|
||||
s.add_dependency "actionpack", [">= 4.0.1"]
|
||||
s.add_dependency "railties", [">= 4.0.1"]
|
||||
|
|
|
@ -7,9 +7,14 @@ module Haml
|
|||
class Engine < ::Rails::Engine
|
||||
end
|
||||
class Railtie < ::Rails::Railtie
|
||||
config.app_generators.template_engine :haml
|
||||
if ::Rails.version.to_s >= "3.1"
|
||||
config.app_generators.template_engine :haml
|
||||
else
|
||||
config.generators.template_engine :haml
|
||||
end
|
||||
|
||||
config.before_initialize do
|
||||
Haml.init_rails(binding)
|
||||
Haml::Template.options[:format] = :html5
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue