Created
November 27, 2023 10:09
-
-
Save RStankov/67b83bb51326e47b3ea9ab6a24ffe7a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Controller < ActionController::Base | |
include DevelopmentLogging if Rails.env.development? | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DevelopmentLogging | |
def self.included(controller) | |
controller.before_action :print_empty_lines_in_log | |
end | |
private | |
def print_empty_lines_in_log | |
10.times { logger.info '' } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment