LoginSignup
0
0

More than 3 years have passed since last update.

hamlの導入方法

Posted at

今回はhamlを導入し、erbをhamlに変換する方法を紹介していきます。

手順

1.Gemfileに以下を記述


gem 'haml-rails'

2.bundle install

bundle install

3.ターミナルで以下のコマンドを実行し、拡張子がerbのファイルをhamlに変換する。

$ rails haml:erb2haml

※Would you like to delete the original .erb files? (This is not recommended unless you are under version control.) (y/n)
と聞かれるため、yと入力するとデフォルトで作成されたerbファイルはHamlに変換される。

以上

0
0
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
0
0