effective_resources 2.37.5 → 2.38.0

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: 27dc5d15a4f2b71fa1e64361900ffebca6733e3606217faa29790bc88bf06a51
4
- data.tar.gz: c4606511a4f6b4c8abd29d12d183c5d362f90fd7cbf5b570c71e8725575dfd1c
3
+ metadata.gz: 6f5ef8c2855de9c2fd9535d1a21185d73db7e2051f094ce96c3660bc4cb32d9a
4
+ data.tar.gz: ff5df57c5f63f104aea1a1441e4f57401da054d047c5de734c454a8cd5730470
5
5
  SHA512:
6
- metadata.gz: bd50e2e754e77d0f4007798d9be77ef0b65f15c89e200969b0f98190b70096c7b5ae9a0c8326dc27a4dc074cc8657a767ab2b844425bc02eb4eb597e72663597
7
- data.tar.gz: a7dd24826133d17607b29f323c008e5e0868324e41c8ad6fe18d9e8f96b7dc71b5d8a6bace994ae43f9e5c977a0e21343fae7e39250e78e2e0278663ab3f8e0b
6
+ metadata.gz: 2a9fc83aa10031b425ee53a693ce86669d1151c562fcf3a7ead47ba99b2988de36702e371538b62ac5b4eee00e492b77420db228fec15d09eb2ef8f10fb06f5a
7
+ data.tar.gz: 5c5dfa43a055afbadddb7a1859c0b15d0844a829c00c3e3d9f0e2f84fb64456c66bba1ebadefe24a382151ca2fb388d5d890ecda3f1a35f6ce85fbb6865a3a4a
@@ -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'
@@ -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.5'.freeze
2
+ VERSION = '2.38.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.37.5
4
+ version: 2.38.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-06-03 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rails
@@ -253,6 +252,7 @@ files:
253
252
  - app/views/application/edit.html.haml
254
253
  - app/views/application/edit.js.erb
255
254
  - app/views/application/index.html.haml
255
+ - app/views/application/member_action.html.haml
256
256
  - app/views/application/member_action.js.erb
257
257
  - app/views/application/nested_datatable_action.js.erb
258
258
  - app/views/application/new.html.haml
@@ -284,7 +284,6 @@ homepage: https://github.com/code-and-effect/effective_resources
284
284
  licenses:
285
285
  - MIT
286
286
  metadata: {}
287
- post_install_message:
288
287
  rdoc_options: []
289
288
  require_paths:
290
289
  - lib
@@ -299,8 +298,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
299
298
  - !ruby/object:Gem::Version
300
299
  version: '0'
301
300
  requirements: []
302
- rubygems_version: 3.5.9
303
- signing_key:
301
+ rubygems_version: 4.0.17
304
302
  specification_version: 4
305
303
  summary: Make any controller an effective resource controller.
306
304
  test_files: []