Skip to content

Commit d4b27b0

Browse files
author
Ruslan Korolev
committed
remove old code for rails 3x and update haml dependency
1 parent b8a1c2a commit d4b27b0

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

haml-rails.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
1515
s.rubyforge_project = "haml-rails"
1616
s.required_rubygems_version = ">= 1.3.6"
1717

18-
s.add_dependency "haml", [">= 3.1", "< 5.0"]
18+
s.add_dependency "haml", [">= 4.0.6", "< 5.0"]
1919
s.add_dependency "activesupport", [">= 4.0.1"]
2020
s.add_dependency "actionpack", [">= 4.0.1"]
2121
s.add_dependency "railties", [">= 4.0.1"]

lib/haml-rails.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,9 @@ module Rails
77
class Engine < ::Rails::Engine
88
end
99
class Railtie < ::Rails::Railtie
10-
if ::Rails.version.to_s >= "3.1"
11-
config.app_generators.template_engine :haml
12-
else
13-
config.generators.template_engine :haml
14-
end
10+
config.app_generators.template_engine :haml
1511

1612
config.before_initialize do
17-
Haml.init_rails(binding)
1813
Haml::Template.options[:format] = :html5
1914
end
2015

0 commit comments

Comments
 (0)