rgviz-rails 0.22 → 0.23

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.
@@ -401,13 +401,13 @@ module Rgviz
401
401
  case node.function
402
402
  when ScalarFunctionColumn::Sum, ScalarFunctionColumn::Difference,
403
403
  ScalarFunctionColumn::Product, ScalarFunctionColumn::Quotient
404
- @string += "("
404
+ @string += "("
405
405
  node.arguments[0].accept self
406
406
  @string += node.function.to_s
407
407
  node.arguments[1].accept self
408
408
  @string += ")"
409
409
  else
410
- @string += @executor.adapter.accept_scalar_function_column(node, self)
410
+ @executor.adapter.accept_scalar_function_column(node, self)
411
411
  end
412
412
  false
413
413
  end
data/rails/init.rb CHANGED
@@ -1,3 +1,7 @@
1
+ require "rgviz_rails/view_helper"
2
+ # includes the view helper to ActionView::Base
3
+ ActionView::Base.send(:include, Rgviz::ViewHelper)
4
+
1
5
  config.after_initialize do
2
6
  class ::ActionController::Base
3
7
  alias_method :original_render, :render
@@ -128,6 +128,10 @@ describe Executor do
128
128
  Person.make :age => nil, :name => 'b'
129
129
  end
130
130
 
131
+ it_processes_single_select_column "age where city_name = 'Laos' and year(birthday) = '2010'", 'age', :number, 1, 'age' do
132
+ Person.make :age => 1, :name => 'a', :city => City.make(:name => 'Laos'), :birthday => '2010-01-01'
133
+ end
134
+
131
135
  it_processes_single_select_column 'name where age is not null', 'name', :string, 'a', 'name' do
132
136
  Person.make :age => 1, :name => 'a'
133
137
  Person.make :age => nil, :name => 'b'
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgviz-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
4
+ hash: 37
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 22
9
- version: "0.22"
8
+ - 23
9
+ version: "0.23"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ary Borenszweig
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-18 00:00:00 +07:00
17
+ date: 2010-08-19 00:00:00 +07:00
18
18
  default_executable:
19
19
  dependencies: []
20
20