mochigome 0.1.19 → 0.1.20

Sign up to get free protection for your applications and to get access to all the features.
data/lib/mochigome_ver.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mochigome
2
- VERSION = "0.1.19"
2
+ VERSION = "0.1.20"
3
3
  end
data/lib/query.rb CHANGED
@@ -38,6 +38,7 @@ module Mochigome
38
38
  options[:fields].reject{|a| a[:in_ruby]}
39
39
  agg_fields.each_with_index do |a, i|
40
40
  d_expr = a[:value_proc].call(data_model.arel_table)
41
+ d_expr = d_expr.expr if d_expr.respond_to?(:expr)
41
42
  agg_rel.select_expr(d_expr.as("d%03u" % i))
42
43
  end
43
44
 
@@ -18,6 +18,9 @@ module Mochigome
18
18
  else
19
19
  @attr_expr = nil
20
20
  end
21
+ if @attr_expr && @attr_expr.respond_to?(:expr)
22
+ @attr_expr = @attr_expr.expr
23
+ end
21
24
  @focus_settings = Mochigome::ReportFocusSettings.new(@model)
22
25
  @focus_settings.type_name "#{@model.human_name} #{@attr.to_s.humanize}"
23
26
  @focus_settings.name lambda{|r| r.send(attr)}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mochigome
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 51
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 19
10
- version: 0.1.19
9
+ - 20
10
+ version: 0.1.20
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Mike Simon
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-06-14 00:00:00 Z
18
+ date: 2012-06-15 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement