five-two-nw-olivander 0.2.0.41 → 0.2.0.42

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: f5f4e902162ea861a5acb228fa96555d9d4ecd5a6a6f0c9a618f481617c32b1f
4
- data.tar.gz: 93946759f63ee81a1bfae3eaff2bfba446c68daa1d25fdf02f93124dfe52e0fa
3
+ metadata.gz: f4f6a5a132be75741c971c202ffb9e84e9dd0baa2b4d801a27d8bc062becc82a
4
+ data.tar.gz: f3fae3ffa8b17681bb9930aa3ae8b93686cbec70e2e78fc76963b8836a4b7286
5
5
  SHA512:
6
- metadata.gz: a9a23fe88b64c6b7835cd7e2899ae4f37d9b3bea5bd147463b7a19ec38ff96bf752835062e5df86870d5778a8040712a109855902420d99f4190d8ad692c9984
7
- data.tar.gz: 59ef2ac3778b8216062052596ca5c8b087b4b30102b9a5bc5dcfd819756ca4680f573daeda6cd858216f11fefaa60ba8810856bcba63536fbfbe1873601be397
6
+ metadata.gz: a8af9883db04b3f000e2b926ab7dff2d1f5e1f9934ad752d6818d6cd1324353364c6077e31acd45c991ffb461a7d754cbf927e18fba400ed3541ebd914e7f61f
7
+ data.tar.gz: 718f1125a137e63d61f182067918306ccf000c077aee2845e212c7401f94f225638a2f3df05527fbdc8c7d9540b498b9486c34151b8a440ea480151919587cf7
@@ -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] #&& !param[1].blank?
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 (response.body.respond_to?(:length) && response.body.length > 0)
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
@@ -127,7 +127,9 @@ module Olivander
127
127
  end
128
128
 
129
129
  format.json { render json: resource }
130
- format.turbo_stream {}
130
+ format.turbo_stream do
131
+ flash.now[:success] ||= resource_flash(:success, resource, action)
132
+ end
131
133
  end
132
134
  end
133
135
  end
@@ -186,8 +188,8 @@ module Olivander
186
188
  params.keys.each do |k|
187
189
  if params[k].is_a? ActionController::Parameters
188
190
  recurse_and_fix_date_params(params[k])
189
- else
190
- params[k] = rearrange_date_param(params[k]) if date_params.include?(k.to_sym)
191
+ elsif date_params.include?(k.to_sym)
192
+ params[k] = rearrange_date_param(params[k])
191
193
  end
192
194
  end
193
195
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # needed for gem
4
4
  module Olivander
5
- VERSION = '0.2.0.41'
5
+ VERSION = '0.2.0.42'
6
6
  end
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.41
4
+ version: 0.2.0.42
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-03-26 00:00:00.000000000 Z
11
+ date: 2025-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chartkick