Automatically apply bootstrap style to devise view files

Conclusion

$ rails g devise:views:bootstrap_templates -f

This will automatically apply the bootstrap style to all devise view files. アカウント.png ログイン.png パスワード.png

Prepare a little more

Code written by default in the devise view file

<div class="container">
  <div class="row">
    <div class="mx-auto" style="width: 580px;">

    </div>
  </div><!-- End of row -->
</div><!-- End of container -->

If you surround it with this, アカウント登録(中央).png ログイン(中央).png パスワード(中央).png

Good vibes!

Recommended Posts

Automatically apply bootstrap style to devise view files
[Caution !!] Precautions when converting Rails devise and view files to haml
How to use binding.pry for view files
Apply Twitter Bootstrap 4 to Spring Boot 2 using Webjars