This module contains class methods that will automatically be available to ActiveRecord models.
In the ActiveRecord model you wish to integrate with Ruport, add the following line just below the class definition:
acts_as_reportable
Available options:
:only
an attribute name or array of attribute names to include in the results, other attributes will be excuded.
:except
an attribute name or array of attribute names to exclude from the results.
:methods
a method name or array of method names whose result(s) will be included in the table.
:include
an associated model or array of associated models to include in the results.
Example:
class Book < ActiveRecord::Base acts_as_reportable, :only => 'title', :include => :author end
# File lib/ruport/acts_as_reportable.rb, line 73 def acts_as_reportable(options = {}) cattr_accessor :aar_options, :aar_columns self.aar_options = options include Ruport::Reportable::InstanceMethods extend Ruport::Reportable::SingletonMethods end