web47core 3.2.3.14 → 3.2.3.16

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: 42bdca3eda2c6f331a9a78011e90e31bdec71e2ab8c1fabaa8e0ba2150931f7a
4
- data.tar.gz: ddf4f86f16d3721e3af5b5e178af1cb3f5b2ad26728ed58958b70f06934985bf
3
+ metadata.gz: 9352c85947fbaa91629aa7f60bef985bc7fd148cd6ff60e2bec7d141b2e6c977
4
+ data.tar.gz: 71c329f35ad2caf3a8f5f81dbd7764c376fd470e2274b063f147a156675e7702
5
5
  SHA512:
6
- metadata.gz: 5411d42084336a42bff7adeb7d127a372fe885433686e00b050feab23f23b5581533ab13f78a6cbf9e4307c8d29bba0241ec9df8bf5896f08a26f7bc778b9044
7
- data.tar.gz: ac3178e224843d4dbdb3ba4f34e5f8c1a7d42a4c6e945124424b30eaa6ead45375e74d76c4b25c1c7fe5054371a1a25b1b6d520a8dfdc46379b436faa1cdfd80
6
+ metadata.gz: 2333cf3f5c5ed1e12e0597cc2af30213fd3f97390f3fb13b6575aac6933f4819ec8aa8420eaa38fc981b6cad8d19f7fb3f620faf7ff6fcc153cabd243367276d
7
+ data.tar.gz: 160eef1a00bf46335a434a516683a1f69515c575e21f4e3d45d052c4b78c8c80bff5a3ae5d63cdba6c5a13d7134f0c49a2997cef9bc9af277ad186ec3058647f
@@ -3,10 +3,26 @@
3
3
  # with no extra checks for CSRF,authentication, layouts or the ilk. Just say, no, go away!
4
4
  class ErrorsController < ActionController::Base
5
5
  # No CSRF/layout/filters; keep it cheap
6
+ skip_authorization_check if respond_to?(:skip_authorization_check)
7
+ skip_forgery_protection
8
+
9
+ # @abstract Quietly return a 410 Gone and go away, dont report this
6
10
  def not_found
7
11
  if defined?(NewRelic) && defined?(NewRelic::Agent)
8
12
  NewRelic::Agent.ignore_transaction
9
13
  end
10
14
  head :gone # 410 Gone is used here to indicate that the resource has been intentionally and permanently removed, and clients should not expect it to be available again. This is stronger than the standard 404 Not Found, which is used when the resource may be available in the future.
11
15
  end
16
+
17
+ # @abstract Quietly return 204 for OPTIONS (preflight)
18
+ def preflight
19
+ if defined?(NewRelic) && defined?(NewRelic::Agent)
20
+ NewRelic::Agent.ignore_transaction
21
+ end
22
+ # Add CORS headers if you normally set them (optional)
23
+ # response.set_header('Access-Control-Allow-Origin', '*')
24
+ # response.set_header('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE, OPTIONS')
25
+ # response.set_header('Access-Control-Allow-Headers', 'Content-Type, Authorization, X-Requested-With')
26
+ head :no_content
27
+ end
12
28
  end
@@ -54,6 +54,12 @@ class CardNavBuilder
54
54
  item_link(path, title, icon_name)
55
55
  end
56
56
 
57
+ def duplicate_link(path, title: 'Duplicate', icon_name: :duplicate)
58
+ return unless can?(:create, @obj)
59
+
60
+ item_link(path, title, icon_name)
61
+ end
62
+
57
63
  def delete_link(path, confirm: nil, title: 'Delete')
58
64
  return unless can?(:manage, @obj)
59
65
 
@@ -176,7 +176,7 @@ module ModelModalHelper
176
176
 
177
177
  def model_modal_fields(model, _options = {})
178
178
  content_tag(:div, class: 'datagrid m-2') do
179
- field_names = ((model.class.allowed_param_names) + %w(description name)).uniq.sort
179
+ field_names = ((model.class.allowed_param_names) + %w(description name display_value)).uniq.sort
180
180
  field_names.each do |field_name|
181
181
  concat(model_modal_field(model, field_name)) if model.respond_to?(field_name) && model.send(field_name).present?
182
182
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Web47core
4
- VERSION = '3.2.3.14'
4
+ VERSION = '3.2.3.16'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web47core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3.14
4
+ version: 3.2.3.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Schroeder