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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e70fe9dd387f2e4977683f62f5232e1b2e2bc79
|
4
|
+
data.tar.gz: 6fea1d8d1d538fc9a43cb616ecf3d7bf771a67b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce3a477f2f02b664c048ab93d990599d65c3e2f2642d6a29863d0ad2a00862297143fb9b0a22f212383eb17f6c9e7d08d5d88e9c9f952a65a343c7f8614f8c7b
|
7
|
+
data.tar.gz: 40d9e12ed64a3934a8a510c8b814cdf5b49e3d7f7e831a77fc74a52fa2965f3c3deb18c51f2d72c7b5bca4ab052f19ced7d68fab5efcb8686111c1db390d7b9b
|
@@ -1,7 +1,8 @@
|
|
1
1
|
<%
|
2
2
|
controller ||= params[:controller]
|
3
3
|
|
4
|
-
|
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
|
-
<%
|
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.
|
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]
|
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.
|
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:
|
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.
|
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
|