recordselect 3.6.0 → 3.6.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc636c8898948d4b510ad51b1a697ce7038df040
4
- data.tar.gz: 79e542bbaf5385bd27d6154ef51bd152e6433193
3
+ metadata.gz: 3e70fe9dd387f2e4977683f62f5232e1b2e2bc79
4
+ data.tar.gz: 6fea1d8d1d538fc9a43cb616ecf3d7bf771a67b8
5
5
  SHA512:
6
- metadata.gz: e981fd913751ad385e6d12bd778a1c2ab72b2070a6d93136269c908e0e14bb045723f7d0d65547221341928ea8eaeda838bddd8c894eac435c67c1d965cabfe3
7
- data.tar.gz: cc319878a0539d8cccb4800d41516b40c3336372d95cb02e4392fea95b749956b8e4c4842610692852b4901b2d606d8b775635bb176711e8ef76e61f79776c3f
6
+ metadata.gz: ce3a477f2f02b664c048ab93d990599d65c3e2f2642d6a29863d0ad2a00862297143fb9b0a22f212383eb17f6c9e7d08d5d88e9c9f952a65a343c7f8614f8c7b
7
+ data.tar.gz: 40d9e12ed64a3934a8a510c8b814cdf5b49e3d7f7e831a77fc74a52fa2965f3c3deb18c51f2d72c7b5bca4ab052f19ced7d68fab5efcb8686111c1db390d7b9b
@@ -1,7 +1,8 @@
1
1
  <%
2
2
  controller ||= params[:controller]
3
3
 
4
- pagination_url_params = params.permit(:search).permit(*permit_rs_browse_params).merge(:controller => controller, :action => :browse, :search => params[:search], :update => 1)
4
+ permit_fields = [:search] + (permit_rs_browse_params || [])
5
+ pagination_url_params = params.permit(*permit_fields).merge(:controller => controller, :action => :browse, :search => params[:search], :update => 1)
5
6
  prev_url = url_for(pagination_url_params.merge(:page => page.prev.number)) if page.prev?
6
7
  next_url = url_for(pagination_url_params.merge(:page => page.next.number)) if page.next?
7
8
  -%>
@@ -1,4 +1,7 @@
1
- <% url_options = params.permit(:search).permit(*permit_rs_browse_params).merge(:controller => controller, :action => :browse, :page => 1, :update => 1) -%>
1
+ <%
2
+ permit_fields = [:search] + (permit_rs_browse_params || [])
3
+ url_options = params.permit(*permit_fields).merge(:controller => controller, :action => :browse, :page => 1, :update => 1)
4
+ -%>
2
5
  <%= form_tag url_options, {:method => :get, :remote => true, :id => record_select_search_id} -%>
3
6
  <%= text_field_tag 'search', params[:search], :autocomplete => 'off', :class => 'text-input' %>
4
7
  <%= submit_tag 'search', :class => "search_submit" %>
@@ -75,7 +75,9 @@ module RecordSelect
75
75
  def record_select_condition_for_column(column, value)
76
76
  model = record_select_config.model
77
77
  column_name = model.quoted_table_name + '.' + model.connection.quote_column_name(column.name)
78
- if value.blank? and column.null
78
+ if value.is_a? Array
79
+ {column.name => value}
80
+ elsif value.blank? and column.null
79
81
  "#{column_name} IS NULL"
80
82
  elsif column.text?
81
83
  ["LOWER(#{column_name}) LIKE ?", value]
@@ -2,7 +2,7 @@ module RecordSelect
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 6
5
- PATCH = 0
5
+ PATCH = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recordselect
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Cambra
@@ -10,22 +10,8 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-09-29 00:00:00.000000000 Z
13
+ date: 2017-06-09 00:00:00.000000000 Z
14
14
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: shoulda
17
- requirement: !ruby/object:Gem::Requirement
18
- requirements:
19
- - - ">="
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :development
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- version: '0'
29
15
  - !ruby/object:Gem::Dependency
30
16
  name: bundler
31
17
  requirement: !ruby/object:Gem::Requirement
@@ -113,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
99
  version: '0'
114
100
  requirements: []
115
101
  rubyforge_project:
116
- rubygems_version: 2.5.1
102
+ rubygems_version: 2.6.10
117
103
  signing_key:
118
104
  specification_version: 4
119
105
  summary: RecordSelect widget as a replacement for massive drop down lists