effective_resources 2.36.2 → 2.36.4

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: 5b9b451b98269652e6354bd695128d056cf02e991289e2a8595f5b03019611d8
4
- data.tar.gz: 9a9a08f4bf5179a91ff0d42eaf84a85b3356bfd31f920b80615476e8d23030a6
3
+ metadata.gz: d3ff88c8978b4ed28a1f6980a5a97130cb8d42c5bdee07cbaef255675fd07de5
4
+ data.tar.gz: 57761a2906421319973b0b55ca5881fe45e64d3cf3f557d2dcad989767f46acd
5
5
  SHA512:
6
- metadata.gz: 2400254764fb5bed455b81b20e28383bfb16047c24cb278e3cf1edee2623446165fe5d50d2343ba9a3ec5f542ee6d3458575ace74aff01e95922e78522dec8b8
7
- data.tar.gz: cc7dd8201359a4c8d0de00a0a6b93e92822a02555ca202796b046c1acaa3d27acf18d34d863540eb4880dc8e11c36dd7580abcffd5efa43582dbb01982a9dc20
6
+ metadata.gz: 9c87aabca3c9cd31830af970da57d1a0faed0eca28580b00980a9f4b899c42c8e996298042d724d8421928167095333c3b647034b77b8b58df254e304d45b931
7
+ data.tar.gz: 479b95d77770f3adbcdc93c989a05f391454b4757e6fb4b8326edbb68568f2ae35913212648960f4d6f53e33e6121c3152bf8e88bd76ba7bafacf4cccd320ea8
@@ -18,6 +18,17 @@ module Effective
18
18
  effective_resource.url_helpers.url_for(merged_url_options)
19
19
  end
20
20
 
21
+ # Override from wicked to support a fallback wizard step template
22
+ def render_step(the_step, options = {}, params = {})
23
+ if the_step.nil? || the_step.to_s == Wicked::FINISH_STEP
24
+ redirect_to_finish_wizard(options, params)
25
+ elsif lookup_context.exists?(the_step.to_s, lookup_context.prefixes)
26
+ render(the_step, options)
27
+ else
28
+ render('effective/acts_as_wizard/wizard_step', options)
29
+ end
30
+ end
31
+
21
32
  end
22
33
  end
23
34
  end
@@ -227,8 +227,8 @@ module EffectiveResourcesHelper
227
227
  end
228
228
 
229
229
  # Tableize attributes
230
- # This is used by effective_orders, effective_logging, effective_trash and effective_mergery
231
- def tableize_hash(obj, table: 'table', th: true, sub_table: 'table', sub_th: true, flatten: true)
230
+ # This is used by effective_logging, effective_trash, and effective_mergery
231
+ def tableize_hash(obj, table: 'table table-sm table-striped', th: true, sub_table: 'table', sub_th: true, flatten: true)
232
232
  case obj
233
233
  when Hash
234
234
  if flatten && obj[:attributes].kind_of?(Hash)
@@ -1,11 +1,3 @@
1
1
  = wizard_card(resource) do
2
2
  - partial = "#{resource.render_path}/#{resource.render_step}_fields"
3
-
4
- - if render_partial_exists?(partial)
5
- = effective_table_with(resource) { |f| render(partial, f: f) }
6
-
7
- - elsif Rails.env.development? || Rails.env.test?
8
- - names = partial.split('/')
9
- - name = names[0...-1].join('/') + '/_' + names.last + '.html.haml'
10
-
11
- %div.alert.alert-warning Unable to find partial: #{name}
3
+ = effective_table_with(resource) { |f| render(partial, f: f) }
@@ -0,0 +1,15 @@
1
+ - prefix = controller_path
2
+ - locals = { resource: resource, Effective::Resource.new(resource).name.to_sym => resource }
3
+
4
+ = render "#{prefix}/layout" do
5
+ = render_if_exists("#{prefix}/content", locals)
6
+
7
+ = card do
8
+ = render_if_exists("#{prefix}/#{step}_requirements", locals)
9
+
10
+ = effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
11
+ = f.hidden_field :id
12
+
13
+ = render("#{prefix}/#{step}_fields", f: f)
14
+
15
+ = f.submit 'Save and Continue', left: true
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '2.36.2'.freeze
2
+ VERSION = '2.36.4'.freeze
3
3
  end
@@ -213,7 +213,7 @@ module EffectiveResources
213
213
  resource.datatable_name
214
214
  elsif resource.respond_to?(:model_name) == false # Just a string. Fees will do this
215
215
  value = I18n.t(resource)
216
- raise StandardError.new("Missing translation: #{resource}") if value.include?(resource)
216
+ raise StandardError.new("Missing translation: #{resource}") if value.include?(resource) || value.include?("Missing translation:")
217
217
  value
218
218
  elsif attribute.blank?
219
219
  resource.model_name.human
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.36.2
4
+ version: 2.36.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-24 00:00:00.000000000 Z
11
+ date: 2026-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -266,6 +266,7 @@ files:
266
266
  - app/views/effective/acts_as_published/_fields.html.haml
267
267
  - app/views/effective/acts_as_slugged/_fields.html.haml
268
268
  - app/views/effective/acts_as_wizard/_wizard_step.html.haml
269
+ - app/views/effective/acts_as_wizard/wizard_step.html.haml
269
270
  - app/views/effective/resource/_actions.html.haml
270
271
  - app/views/effective/resource/_actions_dropleft.html.haml
271
272
  - app/views/effective/resource/_actions_glyphicons.html.haml