Introduction
Introduction Statistics Contact Development Disclaimer Help
README.md - reportable - Fork of reportable required by WarVox, from hdm/report…
git clone git://jay.scot/reportable
Log
Files
Refs
README
---
README.md (3301B)
---
1 Reportable
2 ==========
3 [![Build Status](https://travis-ci.org/saulabs/reportable.png?branch=mas…
4
5 Reportable allows for the easy creation of reports based on `ActiveRecor…
6
7
8 Usage
9 -----
10
11 Usage is pretty easy. To declare a report on a model, simply define that…
12
13 class User < ActiveRecord::Base
14
15 reportable :registrations, :aggregation => :count
16
17 end
18
19 The `reportable` method takes a bunch more options which are described i…
20 the number of updated users records per second or the number of registra…
21
22 class User < ActiveRecord::Base
23
24 reportable :last_name_starting_with_a_registrations, :aggregation …
25
26 reportable :updated_per_second, :aggregation => :count, :grouping …
27
28 end
29
30 For every declared report a method is generated on the model that return…
31
32 User.registrations_report
33
34 User.last_name_starting_with_a_registrations_report
35
36 User.updated_per_second_report
37
38
39 Working with the data
40 ---------------------
41
42 The data is returned as an `Array` of `Array`s of `DateTime`s and `Float…
43
44 [
45 [DateTime.now, 1.0],
46 [DateTime.now - 1.day, 2.0],
47 [DateTime.now - 2.days, 3.0]
48 ]
49
50 Reportable provides helper methods to generate a sparkline image from th…
51
52 <%= google_report_tag(User.registrations_report) %>
53
54 For other options to generate sparklines see the [API docs](http://rdoc.…
55
56
57 Installation
58 ------------
59
60 To install the Reportable gem, simply run
61
62 [sudo] gem install reportable
63
64 ### Rails 3.x
65
66 To install Reportable for Rails 3.x, add it to your application's Gemfil…
67
68 gem 'reportable', :require => 'saulabs/reportable'
69
70 and generate the migration that create reportable's cache table (beware …
71
72 rails generate reportable_migration
73
74 If you want to use reportable's JavaScript graph output format, you also…
75
76 rails generate reportable_raphael_assets
77
78 if you want to use [Raphael](http://raphaeljs.com/) or if you want to us…
79
80 rails generate reportable_jquery_flot_assets
81
82
83 Plans
84 -----
85
86 * add support for Oracle and MSSQL
87 * add support for DataMapper
88 * add more options to generate graphs from the data
89 * add the option to generate textual reports on the command line
90
91
92 Authors
93 -------
94
95 © 2008-2012 Marco Otte-Witte (<http://simplabs.com>) and Martin Kavalar…
96
97 Released under the MIT license
98
99
100 Contributors
101 ------------
102
103 * Eric Lindvall (<http://github.com/eric>)
104 * Jan Bromberger (<http://github.com/jan>)
105 * Jared Dobson (<http://github.com/onesupercoder>)
106 * Jarod Reid
107 * Lars Kuhnt (<http://github.com/larskuhnt>)
108 * Max Schöfmann (<http://github.com/schoefmax>)
109 * Myron Marston (<http://github.com/myronmarston>)
110 * Ryan Bates (<http://github.com/ryanb>)
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.