effective_resources 2.27.2 → 2.27.3
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 152ca8f72baa4fc808f0399c60fac21eec2e2a5433f69f7a7cef1b7e1396a1e4
|
|
4
|
+
data.tar.gz: 3677240db331ebea3b8c602886f8b745c2a4a329af5e3a3d84bea6667b7e9a98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab800a6dd8b5ddbe09e554c924715e9ec51de9e846a998a10d4b6ba0d2cec7fb6af610796a677a55670526ed81d728f09b67cb2393ff67a1b94afee530d35c09
|
|
7
|
+
data.tar.gz: b770f248adcf8731de5e01b56d61b034bc022925d6cb48b7b2476ea2e04536b63d5f57c0dca35a3fe41676c4e3d5cfb0315a1ba984a85d4ae5c63645fa801d2b
|
|
@@ -277,7 +277,7 @@ module EffectiveResourcesHelper
|
|
|
277
277
|
title = resource.wizard_step_title(step)
|
|
278
278
|
raise("expected a title for step #{step}") unless title.present?
|
|
279
279
|
|
|
280
|
-
link = if edit_effective_wizard? && resource.is_a?(controller.resource_klass) && resource.can_visit_step?(step)
|
|
280
|
+
link = if edit_effective_wizard? && ['build', 'show', 'update'].include?(controller.action_name) && resource.is_a?(controller.resource_klass) && resource.can_visit_step?(step)
|
|
281
281
|
link_to('Edit', wizard_path(step), title: "Edit #{title}", class: 'btn btn-secondary mb-2')
|
|
282
282
|
end
|
|
283
283
|
|
data/lib/effective_resources.rb
CHANGED
|
@@ -120,10 +120,13 @@ module EffectiveResources
|
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
def self.truthy?(value)
|
|
123
|
+
return true if value.kind_of?(String) && ['yes', 'true'].include?(value.downcase)
|
|
124
|
+
return false if value.kind_of?(String) && ['no', 'false'].include?(value.downcase)
|
|
125
|
+
|
|
123
126
|
if defined?(::ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES) # Rails <5
|
|
124
127
|
::ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES.include?(value)
|
|
125
128
|
else
|
|
126
|
-
::ActiveRecord::Type::Boolean.new.cast(value)
|
|
129
|
+
::ActiveRecord::Type::Boolean.new.cast(value) || value.to_s.downcase == 'yes'
|
|
127
130
|
end
|
|
128
131
|
end
|
|
129
132
|
|
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.27.
|
|
4
|
+
version: 2.27.3
|
|
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: 2025-01-
|
|
11
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|