
Rails ActiveRecord SQL queries log beautifier
If you're a developer who frequently works with Ruby on Rails and values clean, readable SQL output, the PpSql gem is definitely worth your attention. Designed to replace the standard ActiveRecord #to_sql method, this gem enhances your console experience by providing beautifully formatted SQL code output. This means no more squinting at jumbled SQL statements in your console or logs; instead, you’ll enjoy clear and organized SQL queries that are easier to read and debug.
This gem is compatible with Ruby 3.1 and higher, as well as Rails 7.0 and beyond. For those with legacy projects, there’s even support for older versions of Ruby and Rails. Whether you’re using it for casual debugging or serious application development, PpSql makes understanding SQL much simpler.
Formatted Output: Produces well-structured SQL statements both in the console and within Rails logs.
Compatibility: Works with Ruby 3.1+ and Rails 7.0+, but also supports older versions for legacy code bases.
Customizable Behavior: Users can choose not to overwrite the default #to_sql method, providing flexibility based on project requirements.
Integration with Other Formatters: Plays well with custom output formatters and can be utilized seamlessly within different debugging tools.
Easy Installation: Simply add the gem to your Gemfile and execute a command to start enjoying formatted SQL in no time.
Open Source: Licensed under the MIT License, making it free to use and modify as needed.
Supported by JetBrains: Ensures compatibility and support for a popular development environment, enhancing usability for many developers.
