How convert your .erb to .slim :
Update (18-08-2015)
You can simply use html2slim gem
gem install html2slim
This package include a tool called erb2slim
which can convert erb file to slim recursively. Option -d
for delete the erb file after the convert finished.
erb2slim -d <dir of your views>
View on devise wiki
Original answer
You must pass through HAML !
Install HAML dependencies on your environment or your gemset
gem install html2haml # This was moved out of haml gem
gem install ruby_parser
Switch to HAML templating
find . -name '*erb' | \
xargs ruby -e 'ARGV.each { |i| puts "html2haml -r #{i} #{i.sub(/erb$/,"haml")}"}' | \
bash
Install SLIM tool dependency
gem install haml2slim # https://github.com/fredwu/haml2slim
Switch to SLIM templating
find . -name '*haml' | \
xargs ruby -e 'ARGV.each { |i| puts "haml2slim #{i} #{i.sub(/haml$/,"slim")}"}' | \
bash
Clean ERB and HAML templates
find . -name '*erb' -exec rm -f {} \;
find . -name '*haml' -exec rm -f {} \;
Remove dependencies
gem uninstall html2haml
gem uninstall ruby_parser
gem uninstall haml2slim
That all, have fun