effective_resources 2.27.9 → 2.27.11

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: 32bf960873426cc7a919bd502a75b6332251d741fee24b80b5157f91e48183e3
4
- data.tar.gz: de5cc4f684126ffbfdcf4d295a2e824d745415b13968234af467f290b3cfb18e
3
+ metadata.gz: 9a16ad14c45669551ecef298def17166d5a2527586cf95348a984ff3bf3d68d0
4
+ data.tar.gz: 9032881f23b8d24de89fc22a1fc876a69868d7e8d1723756c24951a30d12c0f7
5
5
  SHA512:
6
- metadata.gz: aec0bd5199cd853917c82d0b3b59436ad676696ef1ff426b00c3b45305553a383c1254ddc4280ea454b37d38944d7251035dfe0993cbeac6a428b2dd517dd028
7
- data.tar.gz: 2dd47c1f482a7d47ed1a7fafb0177074671f524ae09934748233e12d5b5bdce23ffa69bda7759ba18bc07bb9b473dd617127f6dc9102461e2950b0fa892e057e
6
+ metadata.gz: ea19397d163558180e588ac1212cd866163f7f545dd4f8fb9ab26759fac2db6ad2791ac977969f71a51b4c652f87abe86f4b02b79046ffa8d53b8593f21e011a
7
+ data.tar.gz: f3f2858998cd48e0453c200ec0b12bb8b94d548618baf438e09f025a585e1c35eb7837a928af6788f69063fc2a4d9a2ff1cdee1a3a2fd0ce83230f496cf66032
@@ -52,6 +52,8 @@ module EffectiveResourcesPrivateHelper
52
52
  opts[:class] ||= (
53
53
  if opts['data-method'].to_s == 'delete'
54
54
  'btn btn-danger'
55
+ elsif opts[:action] == :new
56
+ 'btn btn-success'
55
57
  elsif h.length == 0
56
58
  'btn btn-primary'
57
59
  elsif defined?(EffectiveBootstrap)
@@ -68,7 +70,7 @@ module EffectiveResourcesPrivateHelper
68
70
  when :show then "#{resource_to_s}"
69
71
  when :destroy then "#{et("effective_resources.actions.destroy")} #{resource_to_s}"
70
72
  when :index then "#{et("effective_resources.actions.index")} #{ets(resource)}"
71
- else "#{opts[:action].to_s.titleize} #{resource_to_s}"
73
+ else "#{opts[:action].to_s.titleize} #{et(resource)}"
72
74
  end
73
75
 
74
76
  h[commit] = opts
@@ -96,7 +96,11 @@ module Effective
96
96
  # Now that we have the scope figured out let's pull the limit number of records into an Array
97
97
  # If there are more than the limit, return as: :string
98
98
  resources = scope.limit(limit).to_a
99
- return { as: :string } unless resources.length < limit
99
+
100
+ if resources.length >= limit
101
+ Rails.logger.info "SEARCH TOOL: limit reached for #{association || res}"
102
+ return { as: :string }
103
+ end
100
104
 
101
105
  # Otherwise there are less than the limit, so we can use a collection select
102
106
  {
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '2.27.9'.freeze
2
+ VERSION = '2.27.11'.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.27.9
4
+ version: 2.27.11
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-03-17 00:00:00.000000000 Z
11
+ date: 2025-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails