Skip to content

Instantly share code, notes, and snippets.

@sorokadima
Created June 12, 2020 08:36
Show Gist options
  • Save sorokadima/046f320c52906fee9effad6e4ad526d6 to your computer and use it in GitHub Desktop.
Save sorokadima/046f320c52906fee9effad6e4ad526d6 to your computer and use it in GitHub Desktop.
Rails test controller
class TestController < ApplicationController
require 'colorize'
def index
result = Rails.env
puts result.class.to_s.colorize(:color => :black, :background => :green)
puts result.to_s.colorize(:color => :black, :background => :yellow)
render text: result
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment