recordselect 3.3.1 → 3.3.2
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.
- data/lib/record_select/actions.rb +1 -1
- data/lib/record_select/conditions.rb +0 -12
- data/lib/record_select/config.rb +1 -1
- data/lib/record_select/version.rb +1 -1
- data/lib/recordselect.rb +1 -1
- metadata +53 -22
- checksums.yaml +0 -7
@@ -8,7 +8,7 @@ module RecordSelect
|
|
8
8
|
@count = klass.count
|
9
9
|
@count = @count.length if @count.is_a? ActiveSupport::OrderedHash
|
10
10
|
pager = ::Paginator.new(@count, record_select_config.per_page) do |offset, per_page|
|
11
|
-
klass.select(record_select_select).includes(record_select_config.include).order(record_select_config.order_by).limit(per_page).offset(offset).
|
11
|
+
klass.select(record_select_select).includes(record_select_config.include).order(record_select_config.order_by).limit(per_page).offset(offset).to_a
|
12
12
|
end
|
13
13
|
@page = pager.page(params[:page] || 1)
|
14
14
|
|
@@ -58,18 +58,6 @@ module RecordSelect
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
# instead of a shotgun approach, this assumes the user is
|
62
|
-
# searching vs some SQL field (possibly built with CONCAT())
|
63
|
-
# similar to the record labels.
|
64
|
-
# def record_select_simple_conditions_from_search
|
65
|
-
# return unless params[:search] and not params[:search].empty?
|
66
|
-
#
|
67
|
-
# search_pattern = record_select_config.full_text_search? ? '%?%' : '?%'
|
68
|
-
# search_string = search_pattern.sub('?', value.downcase)
|
69
|
-
#
|
70
|
-
# ["LOWER(#{record_select_config.search_on})", search_pattern.sub('?', value.downcase)]
|
71
|
-
# end
|
72
|
-
|
73
61
|
# generate conditions from the url parameters (e.g. users/browse?group_id=5)
|
74
62
|
def record_select_conditions_from_params
|
75
63
|
conditions = nil
|
data/lib/record_select/config.rb
CHANGED
data/lib/recordselect.rb
CHANGED
@@ -7,7 +7,7 @@ require 'record_select/conditions'
|
|
7
7
|
require 'record_select/config'
|
8
8
|
require 'record_select/form_builder'
|
9
9
|
require 'record_select/helpers/record_select_helper'
|
10
|
-
require 'record_select/engine'
|
10
|
+
require 'record_select/engine'
|
11
11
|
|
12
12
|
ActionController::Base.send(:include, RecordSelect)
|
13
13
|
ActionView::Base.send(:include, RecordSelectHelper)
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recordselect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 15
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 3
|
8
|
+
- 3
|
9
|
+
- 2
|
10
|
+
version: 3.3.2
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Sergio Cambra
|
@@ -11,39 +17,54 @@ autorequire:
|
|
11
17
|
bindir: bin
|
12
18
|
cert_chain: []
|
13
19
|
|
14
|
-
date: 2013-
|
20
|
+
date: 2013-10-14 00:00:00 Z
|
15
21
|
dependencies:
|
16
22
|
- !ruby/object:Gem::Dependency
|
17
|
-
|
23
|
+
type: :development
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
18
26
|
requirements:
|
19
|
-
-
|
20
|
-
- ">="
|
27
|
+
- - ">="
|
21
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
22
32
|
version: "0"
|
23
|
-
|
24
|
-
name: shoulda
|
25
|
-
requirement: *id001
|
33
|
+
version_requirements: *id001
|
26
34
|
prerelease: false
|
35
|
+
name: shoulda
|
27
36
|
- !ruby/object:Gem::Dependency
|
28
|
-
|
37
|
+
type: :development
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
29
40
|
requirements:
|
30
41
|
- - ~>
|
31
42
|
- !ruby/object:Gem::Version
|
43
|
+
hash: 23
|
44
|
+
segments:
|
45
|
+
- 1
|
46
|
+
- 0
|
47
|
+
- 0
|
32
48
|
version: 1.0.0
|
33
|
-
|
34
|
-
name: bundler
|
35
|
-
requirement: *id002
|
49
|
+
version_requirements: *id002
|
36
50
|
prerelease: false
|
51
|
+
name: bundler
|
37
52
|
- !ruby/object:Gem::Dependency
|
38
|
-
|
53
|
+
type: :runtime
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
39
56
|
requirements:
|
40
57
|
- - ">="
|
41
58
|
- !ruby/object:Gem::Version
|
59
|
+
hash: 5
|
60
|
+
segments:
|
61
|
+
- 3
|
62
|
+
- 1
|
63
|
+
- 3
|
42
64
|
version: 3.1.3
|
43
|
-
|
44
|
-
name: rails
|
45
|
-
requirement: *id003
|
65
|
+
version_requirements: *id003
|
46
66
|
prerelease: false
|
67
|
+
name: rails
|
47
68
|
description: RecordSelect is a Rails widget to help you pick one record out of many. I designed it as a more usable and performant alternative to generating a massive dropdown list
|
48
69
|
email: activescaffold@googlegroups.com
|
49
70
|
executables: []
|
@@ -85,25 +106,35 @@ files:
|
|
85
106
|
homepage: http://github.com/scambra/recordselect
|
86
107
|
licenses:
|
87
108
|
- MIT
|
88
|
-
metadata: {}
|
89
|
-
|
90
109
|
post_install_message:
|
91
110
|
rdoc_options: []
|
92
111
|
|
93
112
|
require_paths:
|
94
113
|
- lib
|
95
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
96
116
|
requirements:
|
97
|
-
-
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
hash: 3
|
120
|
+
segments:
|
121
|
+
- 0
|
122
|
+
version: "0"
|
98
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
|
+
none: false
|
99
125
|
requirements:
|
100
|
-
-
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
hash: 3
|
129
|
+
segments:
|
130
|
+
- 0
|
131
|
+
version: "0"
|
101
132
|
requirements: []
|
102
133
|
|
103
134
|
rubyforge_project:
|
104
|
-
rubygems_version:
|
135
|
+
rubygems_version: 1.8.24
|
105
136
|
signing_key:
|
106
|
-
specification_version:
|
137
|
+
specification_version: 3
|
107
138
|
summary: RecordSelect widget as a replacement for massive drop down lists
|
108
139
|
test_files:
|
109
140
|
- test/recordselect_test.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
data.tar.gz: 8264830c7301ac7c45e073c5555a59c177d2002b
|
4
|
-
metadata.gz: 8bfdb97ac6a0c4e71c18c17332e45b590eb0c4f0
|
5
|
-
SHA512:
|
6
|
-
data.tar.gz: f92b9bd472f6275d77814e0bb0fcdeb93d31a3670a2804b32d0bc76c2eb1239a657006471974505adda5b73809fa0dc787194535084c41fd13bcc00070a82512
|
7
|
-
metadata.gz: bfbec34f8cb5880ce063278819db13fb709e12a1682bdf295b5f42f0315019f1667dbb874f2bcb3488aaa0bae504a65859e8c1ba28dace34b686f43daedf1439
|