Show a deprecation warning when '-e haml' or '-e slim' is specified
This commit is contained in:
parent
1ee0a1123f
commit
d49bb8d4e8
|
@ -66,7 +66,14 @@ BANNER
|
||||||
end
|
end
|
||||||
|
|
||||||
def template_engine
|
def template_engine
|
||||||
options[:template_engine].try(:to_s).try(:downcase) || 'erb'
|
engine = options[:template_engine].try(:to_s).try(:downcase)
|
||||||
|
|
||||||
|
if engine == 'haml' || engine == 'slim'
|
||||||
|
ActiveSupport::Deprecation.warn 'The -e option is deprecated and will be removed in the near future. Please use the html2slim gem or the html2haml gem ' \
|
||||||
|
'to convert erb templates manually.'
|
||||||
|
end
|
||||||
|
|
||||||
|
engine || 'erb'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue