module Rails::ConsoleMethods

Public Instance Methods

r(model, *fields)
Alias for: report
report(model, *fields) click to toggle source
Creates a  +:report+ method helper exposed to rails console

Accepts <tt>ActiveRecord::Relation</tt> and <tt>ActiveRecord::Base</tt> objects 
and generated a table

Example:

  report User
or 
  report Post.all
Note <tt>:r</tt> its the alias method for <tt>:report</tt>

Usage:
  report(records)  # displays report with all fields
  report(records, :field1, :field2, ...) # displays report with given fields

==== Options
* <tt>items</tt>   - The ActiveRecord objects
* <tt>fields</tt>  - Filter only the given fields
# File lib/reportly.rb, line 25
def report(model, *fields)
  Reportly::ConsoleMethods.report(model, *fields)
end
Also aliased as: r