active_scaffold_vho 3.2.2 → 3.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NGM3YmZiODIwOWE0ZTk5ZmVlZTgzNjE3YTQxYTc1YWUxZmFjMzdjMg==
5
+ data.tar.gz: !binary |-
6
+ ZmE4NWI2MTQ2MWQ5ODlkNGNjNGIxMGVjZmYyNjhmMjhkZGIzY2Y5MQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZTEwMjAwMDQxYTFlMGFhNzI0ZTRjZjdiOTcwYTFjNmM0MjFmNjNiYjVmMmNj
10
+ NmJhZjRlYjZlNWY5OTkxN2MwNjVmMzFmMzY4YWUxY2ZjZmRlODcyZDlmM2I4
11
+ YjQyY2NmMjI4MWU1NzU3NDZjMjY4ODY5NjBmZWEzOWI5MGUwYjY=
12
+ data.tar.gz: !binary |-
13
+ NmM0YTdiOTlhOTU2NDRiODNjMDM3NDA0NTQyMjc5YzZhZDk5ZTUyZjA4NjZl
14
+ YTBmNzcyNGM0OTYyZWJkZDM4ZDk4YjgxNWRmZjgzMzIyNTI5ZmEwODYxYzMz
15
+ NzNlMDllYTk0MDJlNDZiMTNlZjU0YWQzOTFiYjUzZTM5YTA1NWU=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_scaffold_vho (3.2.1)
4
+ active_scaffold_vho (3.2.2)
5
5
  kaminari
6
6
  rails (>= 3.1.0)
7
7
 
@@ -120,7 +120,7 @@ module ActiveScaffold
120
120
  end
121
121
 
122
122
  def date_bridge_from_to(column, value)
123
- conversion = column.column.type == :date ? :to_date : :to_time
123
+ conversion = datetime_conversion_for_condition(column)
124
124
  case value[:opt]
125
125
  when 'RANGE'
126
126
  date_bridge_from_to_for_range(column, value).collect(&conversion)
@@ -171,7 +171,7 @@ module ActiveScaffold::DataStructures
171
171
  # search = "CONCAT(a, b)" define your own sql for searching. this should be the "left-side" of a WHERE condition. the operator and value will be supplied by ActiveScaffold.
172
172
  attr_writer :search_sql
173
173
  def search_sql
174
- self.initialize_search_sql if @search_sql === true
174
+ self.initialize_search_sql if !@search_sql.is_a?(Proc) && @search_sql === true
175
175
  @search_sql
176
176
  end
177
177
  def searchable?
@@ -142,9 +142,17 @@ module ActiveScaffold
142
142
  value
143
143
  end
144
144
  end
145
+
146
+ def datetime_conversion_for_condition(column)
147
+ if column.column
148
+ column.column.type == :date ? :to_date : :to_time
149
+ else
150
+ :to_time
151
+ end
152
+ end
145
153
 
146
154
  def condition_for_datetime(column, value, like_pattern = nil)
147
- conversion = column.column.type == :date ? :to_date : :to_time
155
+ conversion = datetime_conversion_for_condition(column)
148
156
  from_value = condition_value_for_datetime(value[:from], conversion)
149
157
  to_value = condition_value_for_datetime(value[:to], conversion)
150
158
 
@@ -2,7 +2,7 @@ module ActiveScaffold
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 2
5
- PATCH = 2
5
+ PATCH = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,71 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold_vho
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.2
5
- prerelease:
4
+ version: 3.2.3
6
5
  platform: ruby
7
6
  authors:
8
7
  - Many, see README
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-05-01 00:00:00.000000000 Z
11
+ date: 2014-05-09 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: shoulda
16
- requirement: &17853480 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
- version_requirements: *17853480
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: bundler
27
- requirement: &17853000 !ruby/object:Gem::Requirement
28
- none: false
29
+ requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ! '>='
31
32
  - !ruby/object:Gem::Version
32
33
  version: 1.0.0
33
34
  type: :development
34
35
  prerelease: false
35
- version_requirements: *17853000
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.0
36
41
  - !ruby/object:Gem::Dependency
37
42
  name: rcov
38
- requirement: &17852520 !ruby/object:Gem::Requirement
39
- none: false
43
+ requirement: !ruby/object:Gem::Requirement
40
44
  requirements:
41
45
  - - ! '>='
42
46
  - !ruby/object:Gem::Version
43
47
  version: '0'
44
48
  type: :development
45
49
  prerelease: false
46
- version_requirements: *17852520
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: rails
49
- requirement: &17852040 !ruby/object:Gem::Requirement
50
- none: false
57
+ requirement: !ruby/object:Gem::Requirement
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: 3.1.0
55
62
  type: :runtime
56
63
  prerelease: false
57
- version_requirements: *17852040
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: 3.1.0
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: kaminari
60
- requirement: &17851660 !ruby/object:Gem::Requirement
61
- none: false
71
+ requirement: !ruby/object:Gem::Requirement
62
72
  requirements:
63
73
  - - ! '>='
64
74
  - !ruby/object:Gem::Version
65
75
  version: '0'
66
76
  type: :runtime
67
77
  prerelease: false
68
- version_requirements: *17851660
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  description: Save time and headaches, and create a more easily maintainable set of
70
84
  pages, with ActiveScaffold. ActiveScaffold handles all your CRUD (create, read,
71
85
  update, delete) user interface needs, leaving you more time to focus on more challenging
@@ -370,27 +384,26 @@ files:
370
384
  homepage: http://github.com/vhochstein/active_scaffold
371
385
  licenses:
372
386
  - MIT
387
+ metadata: {}
373
388
  post_install_message:
374
389
  rdoc_options: []
375
390
  require_paths:
376
391
  - lib
377
392
  required_ruby_version: !ruby/object:Gem::Requirement
378
- none: false
379
393
  requirements:
380
394
  - - ! '>='
381
395
  - !ruby/object:Gem::Version
382
396
  version: '0'
383
397
  required_rubygems_version: !ruby/object:Gem::Requirement
384
- none: false
385
398
  requirements:
386
399
  - - ! '>='
387
400
  - !ruby/object:Gem::Version
388
401
  version: '0'
389
402
  requirements: []
390
403
  rubyforge_project:
391
- rubygems_version: 1.8.17
404
+ rubygems_version: 2.2.2
392
405
  signing_key:
393
- specification_version: 3
406
+ specification_version: 4
394
407
  summary: Rails 3 Version of activescaffold supporting prototype and jquery
395
408
  test_files:
396
409
  - test/bridges/bridge_test.rb