[Ruby] Automatically apply bootstrap styles to devise view files

less than 1 minute read

Conclusion

$ rails g devise:views:bootstrap_templates -f

This will automatically apply bootstrap styles to all devise view files. account.png login.png Password.png

prepare a little more

The code written by default in devise’s 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, Account registration (center).png login (center).png Password (center).png

Good vibes!