query_report 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/query_report/report.rb +15 -0
- data/lib/query_report/version.rb +1 -1
- metadata +2 -2
data/lib/query_report/report.rb
CHANGED
@@ -8,6 +8,8 @@ module QueryReport
|
|
8
8
|
chart_on_pdf: true, paginate: true
|
9
9
|
}
|
10
10
|
class Report
|
11
|
+
include ActionView::Helpers
|
12
|
+
|
11
13
|
attr_accessor :params, :chart, :charts, :filters, :scopes, :current_scope, :options
|
12
14
|
|
13
15
|
def initialize(params, options={}, &block)
|
@@ -29,6 +31,19 @@ module QueryReport
|
|
29
31
|
end
|
30
32
|
end
|
31
33
|
|
34
|
+
# to support the helper methods
|
35
|
+
def method_missing(meth, *args, &block)
|
36
|
+
if Rails.application.routes.url_helpers.respond_to?(meth)
|
37
|
+
Rails.application.routes.url_helpers.send(meth, *args)
|
38
|
+
elsif ActionController::Base.helpers.respond_to?(meth)
|
39
|
+
ActionController::Base.helpers.send(meth, *args)
|
40
|
+
else
|
41
|
+
super # You *must* call super if you don't handle the
|
42
|
+
# method, otherwise you'll mess up Ruby's method
|
43
|
+
# lookup.
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
32
47
|
def column(name, options={}, &block)
|
33
48
|
@columns << Column.new(name, options, block)
|
34
49
|
end
|
data/lib/query_report/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: query_report
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ransack
|