five-two-nw-olivander 0.2.0.41 → 0.2.0.43
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '06378ed26a586e3cc5c8a997aea7971b03b62ee9b930bb309cbfc6885e41ebc2'
|
4
|
+
data.tar.gz: 3f53194c8d46c83fab406a98529fc7e541c823322fc69f94750a33928e0e7f3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2435a4e00bab91eb9bf61e0600e974a9eba2393e3b98da0401281394c2528fb3e76c65462b4971d1b652763e5d802b0218b8d19e4ac814b5867f258d96178b72
|
7
|
+
data.tar.gz: cd9b12f2d567056e4b042afa80e78fafb288300a8c1c397bfd857d53549b943741389e2c9f61b5787e908fbba2372ac74e2113f0794e599821d5c2fb2c7a99bc
|
@@ -29,7 +29,7 @@ module Olivander
|
|
29
29
|
def index_param_search
|
30
30
|
params.each do |param|
|
31
31
|
effective_resource.klass.columns.each do |col|
|
32
|
-
next unless col.name == param[0]
|
32
|
+
next unless col.name == param[0] # && !param[1].blank?
|
33
33
|
|
34
34
|
self.resources = self.resources.where(param[0].to_sym => param[1])
|
35
35
|
end
|
@@ -42,10 +42,10 @@ module Olivander
|
|
42
42
|
else
|
43
43
|
k = resources.klass
|
44
44
|
self.resources = k.all
|
45
|
-
fields = %w[name title description text].keep_if{ |field| k.respond_to?(field) }
|
45
|
+
fields = %w[name title description text].keep_if { |field| k.respond_to?(field) }
|
46
46
|
unless params[:term].blank?
|
47
47
|
like_term = "%#{ActiveRecord::Base.sanitize_sql_like(params[:term])}%"
|
48
|
-
clauses = fields.map{ |field| "#{field} ilike '#{like_term}'" }.join(' or ')
|
48
|
+
clauses = fields.map { |field| "#{field} ilike '#{like_term}'" }.join(' or ')
|
49
49
|
end
|
50
50
|
orders = fields.join(', ')
|
51
51
|
self.resources = self.resources.where(clauses) if clauses.present? && clauses.length.positive?
|
@@ -64,7 +64,7 @@ module Olivander
|
|
64
64
|
run_callbacks(:resource_render)
|
65
65
|
|
66
66
|
respond_to do |format|
|
67
|
-
format.html {
|
67
|
+
format.html {}
|
68
68
|
format.js { render('show', formats: :js) }
|
69
69
|
format.json { render json: resource }
|
70
70
|
format.turbo_stream {}
|
@@ -76,7 +76,7 @@ module Olivander
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def respond_with_success(resource, action)
|
79
|
-
return if
|
79
|
+
return if response.body.respond_to?(:length) && response.body.length > 0
|
80
80
|
|
81
81
|
if specific_redirect_path?(action)
|
82
82
|
respond_to do |format|
|
@@ -93,7 +93,7 @@ module Olivander
|
|
93
93
|
else
|
94
94
|
render(
|
95
95
|
(template_present?(action) ? action : :member_action),
|
96
|
-
locals: { action: action, remote_form_redirect: resource_redirect_path(resource, action)}
|
96
|
+
locals: { action: action, remote_form_redirect: resource_redirect_path(resource, action) }
|
97
97
|
)
|
98
98
|
end
|
99
99
|
end
|
@@ -112,7 +112,9 @@ module Olivander
|
|
112
112
|
end
|
113
113
|
|
114
114
|
format.json { render json: resource }
|
115
|
-
format.turbo_stream
|
115
|
+
format.turbo_stream do
|
116
|
+
flash.now[:success] ||= resource_flash(:success, resource, action)
|
117
|
+
end
|
116
118
|
end
|
117
119
|
else # Default
|
118
120
|
respond_to do |format|
|
@@ -127,7 +129,9 @@ module Olivander
|
|
127
129
|
end
|
128
130
|
|
129
131
|
format.json { render json: resource }
|
130
|
-
format.turbo_stream
|
132
|
+
format.turbo_stream do
|
133
|
+
flash.now[:success] ||= resource_flash(:success, resource, action)
|
134
|
+
end
|
131
135
|
end
|
132
136
|
end
|
133
137
|
end
|
@@ -186,8 +190,8 @@ module Olivander
|
|
186
190
|
params.keys.each do |k|
|
187
191
|
if params[k].is_a? ActionController::Parameters
|
188
192
|
recurse_and_fix_date_params(params[k])
|
189
|
-
|
190
|
-
params[k] = rearrange_date_param(params[k])
|
193
|
+
elsif date_params.include?(k.to_sym)
|
194
|
+
params[k] = rearrange_date_param(params[k])
|
191
195
|
end
|
192
196
|
end
|
193
197
|
end
|
data/lib/olivander/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: five-two-nw-olivander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.
|
4
|
+
version: 0.2.0.43
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Dennis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chartkick
|