1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Added verification for HAML >= 2.3.

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
Fred Wu 2010-03-14 02:06:52 +11:00 committed by José Valim
parent 90e8253205
commit cbd35a846a

View file

@ -17,6 +17,7 @@ class DeviseViewsGenerator < Rails::Generators::Base
directory "devise", "app/views/devise/#{scope}"
when "haml"
require 'haml'
verify_haml_version
create_and_copy_haml_views
end
end
@ -40,4 +41,11 @@ class DeviseViewsGenerator < Rails::Generators::Base
directory devise_haml_source_root, "app/views/devise/#{scope}"
end
def verify_haml_version
unless Haml.version[:major] >= 2 and Haml.version[:minor] >= 3
say "To generate HAML templates, you need to install HAML 2.3 or above."
exit
end
end
end