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
How to use binding.pry for view files
[Rails] Bootstrap form-control does not apply to date_select
Apply Twitter Bootstrap 4 to Spring Boot 2 using Webjars
[Rails] How to edit and customize devise view and controller