effective_resources 2.37.4 → 2.37.6

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: b8e703b5b3bea380e914cdd7e50604bb83f8bb28bb93d722dfb7ece54e5a1e66
4
- data.tar.gz: 95764d5f18980ab5b73ed80dd639852fa359301d615135cb4b3134f9daf279a4
3
+ metadata.gz: 5292c50cea529ab230adb042ca8d1f60e4e7a9278371b92df7224d6bc0dc3371
4
+ data.tar.gz: 4fcb05feec59cfeac7efa272504d6aecc950a24e3ca1d0132cd69a29a5b84332
5
5
  SHA512:
6
- metadata.gz: 40db00b3b8bf222fa902b147519bdd876c5ff3e8dafbbb0e95c5cd24656e1bfb382351369eaa85ca837577452dfbaed45a94e695317632df4885bc39600247c7
7
- data.tar.gz: 8d50e8adab2d0bf9298d880fba1a2e816907387337824860d240d6f890f73954ae4ead1ce757b0fda5e73c8d7b5ae4a1f62e77e398e38c28e31b51beb8ae97e9
6
+ metadata.gz: 5bac26d043dd8d35dbe5428f55990b340a7c42b82bf14bb3e1744fa1187908f1786fb9fdf120c01fbf3e9248cbf11cfd8155b6471906237c4919646f5d0e8825
7
+ data.tar.gz: 290aa7dd1891163d82062322ba9c7bba5b42fc955ad70355aeed4dc424a618023b91b39574c0f2c565a19c15f451e1197ef453097ff020e3f37ce415f49aee89
@@ -198,7 +198,9 @@ module Effective
198
198
  run_callbacks(:resource_render)
199
199
 
200
200
  respond_to do |format|
201
- format.html { }
201
+ # Render the action's own <action>.html template if present, otherwise the shared
202
+ # member_action page (which renders the resource's _form_<action> partial).
203
+ format.html { render(template_present?(action, format: :html) ? action : 'member_action', locals: { action: action }) }
202
204
  format.js do
203
205
  html_template = action if template_present?(action, format: :html)
204
206
  template = template_present?(action) ? action : 'member_action'
@@ -87,6 +87,18 @@ module ActsAsWizard
87
87
  all_steps.last
88
88
  end
89
89
 
90
+ # The first required step. Conventionally :start
91
+ def first_wizard_step
92
+ required_steps.first
93
+ end
94
+
95
+ # The required step immediately after the first one (:start)
96
+ # Useful for sending the user back to the beginning of the wizard content
97
+ # Used in missing info workflow
98
+ def second_wizard_step
99
+ required_steps.second
100
+ end
101
+
90
102
  def completed_steps
91
103
  wizard_steps.keys
92
104
  end
@@ -0,0 +1,9 @@
1
+ - resource = (@_effective_resource || Effective::Resource.new(controller_path))
2
+ - @resource = instance_variable_get('@' + resource.name) if resource.name
3
+
4
+ - if @resource
5
+ .row
6
+ .col-8
7
+ %h1= @page_title
8
+
9
+ = render_resource_form(@resource, action: action)
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '2.37.4'.freeze
2
+ VERSION = '2.37.6'.freeze
3
3
  end
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.37.4
4
+ version: 2.37.6
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-05-11 00:00:00.000000000 Z
11
+ date: 2026-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -253,6 +253,7 @@ files:
253
253
  - app/views/application/edit.html.haml
254
254
  - app/views/application/edit.js.erb
255
255
  - app/views/application/index.html.haml
256
+ - app/views/application/member_action.html.haml
256
257
  - app/views/application/member_action.js.erb
257
258
  - app/views/application/nested_datatable_action.js.erb
258
259
  - app/views/application/new.html.haml