LoginSignup
4
4

More than 5 years have passed since last update.

Deviseのviewsでhamlを使う

Posted at

使用gem

$ gem install html2haml

コマンド

deviseのセッティング後、通常通り、

$ rails g devise:views

で、viewsを作成する。

その後、ターミナルで、

$ for file in app/views/devise/**/*.erb; do html2haml -e $file ${file%erb}haml && rm $file; done

を叩いたら、erbはすべて消え、hamlのみ残る。

参考

How To: Create Haml and Slim Views

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4