Skip to content

arktisklada/console_log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConsoleLog

Log rails variables to the browser console.

Installation

Include console_log in your Gemfile, probably in your development group:

group :development do
  gem "console_log"
end

Usage

From anywhere in a controller, ActiveRecord::Base model, or view, the syntax is:

console_log message, ...

The console_log method accepts one or many arguments, appending each one to the console queue.

You must include the following in your layout file(s):

<%= console_log_javascript_tag %>

When the page renders, the queued messages/variables/objects will be logged to the browser console

About

Log rails variables and objects to the browser console

Resources

License

Stars

Watchers

Forks

Packages

No packages published