recordselect 4.0.13 → 4.0.15

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: 1653f353834a1448e1c0429d219f9a44407e238782c5e31b819f3d7987a4d860
4
- data.tar.gz: b94634eac081ec7afce35dd26dc220c6b460de8cabd45caa3f8beb9fec31db04
3
+ metadata.gz: a408ffa4778e7d9534960dfe9aac449ee74c22c97205541896020ca373142a76
4
+ data.tar.gz: 8d379984dd8567cf153f9ce883852821eac2d0cfc82a7ae32fa4cc32ad55e5a3
5
5
  SHA512:
6
- metadata.gz: 0dff9a052e0d076a0effdb2802c2d680db4645e49baa64fb03a9b370dc97eebd7aeaa37f83b7146a0bc6966d335b6c24619f5e565a213a15879184409d81e931
7
- data.tar.gz: 9363872198eb4d576b3731eac4de6aae5be7454a9d667f3cb314763ec232fa3ecab6919edba86c1fbf61cc026463dc3485675c837bd8d5fdf8316c1f32e91790
6
+ metadata.gz: 29f665c5271c65dd25c6417b106b8dc5e3c1ae33e0bad6f2fbccfbe1e193ded2ddfaf24a0737d81e1f70a83c1ac348837711125cde85e8628a1b05439665cc03
7
+ data.tar.gz: b5942f6674a0d964c706e7006ceffbcdf276168ab6c9c1d33286051fd80ce2d4ee57c2ec4f07911dfb249468bb90d5013d66258c4d61880676629edb3aeabdaa
@@ -6,6 +6,6 @@ record_select_id = record_select_id(controller)
6
6
  <%= render_record_select partial: 'search', locals: {controller: controller, record_select_id: record_select_id} %>
7
7
  <%= render_record_select partial: 'list', locals: {controller: controller, page: @page, record_select_id: record_select_id} %>
8
8
  </div>
9
- <%= javascript_tag do %>
9
+ <%= javascript_tag nonce: true do %>
10
10
  <%= render_record_select(partial: 'highlight', formats: [:js]) %>
11
11
  <% end %>
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RecordSelect
2
4
  module Actions
3
5
  # :method => :get
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RecordSelect
2
4
  module Conditions
3
5
  protected
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RecordSelect
2
4
  # a write-once configuration object
3
5
  class Config
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RecordSelect
2
4
  class Engine < Rails::Engine
3
5
  initializer 'recordselect.action_controller' do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecord # :nodoc:
2
4
  class Base # :nodoc:
3
5
  unless method_defined? :to_label
@@ -6,4 +8,4 @@ module ActiveRecord # :nodoc:
6
8
  end
7
9
  end
8
10
  end
9
- end
11
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Provides a simple pass-through localizer for RecordSelect. If you want
2
4
  # to localize RS, you need to override this method and route it to your
3
5
  # own system.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActionDispatch
2
4
  module Routing
3
5
  class Mapper
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RecordSelect
2
4
  module FormBuilder
3
5
  def record_select(association, options = {})
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RecordSelectHelper
2
4
  # If you use :params option, define this helper in your controller helpers
3
5
  # to return array with those params, so _list partial permits them
@@ -5,7 +7,7 @@ module RecordSelectHelper
5
7
  end
6
8
 
7
9
  def record_select_js(type:, id:, url:, options:)
8
- javascript_tag("new RecordSelect.#{type}(#{id.to_json}, #{url.to_json}, #{options.to_json});")
10
+ javascript_tag("new RecordSelect.#{type}(#{id.to_json}, #{url.to_json}, #{options.to_json});", nonce: true)
9
11
  end
10
12
 
11
13
  # Adds a link on the page that toggles a RecordSelect widget from the given controller.
@@ -51,7 +53,7 @@ module RecordSelectHelper
51
53
  options[:controller] ||= current.class.to_s.pluralize.underscore
52
54
  options[:params] ||= {}
53
55
  options[:id] ||= name.gsub(/[\[\]]/, '_')
54
- options[:class] ||= String.new
56
+ options[:class] = options[:class] ? options[:class].dup : String.new
55
57
  options[:class] << ' recordselect'
56
58
  options[:clear_button] = true unless options.include? :clear_button
57
59
  js = options.include?(:js) ? options.delete(:js) : request.xhr?
@@ -95,7 +97,7 @@ module RecordSelectHelper
95
97
  options[:controller] ||= current.class.to_s.pluralize.underscore
96
98
  options[:params] ||= {}
97
99
  options[:id] ||= name.gsub(/[\[\]]/, '_')
98
- options[:class] ||= String.new
100
+ options[:class] = options[:class] ? options[:class].dup : String.new
99
101
  options[:class] << ' recordselect'
100
102
  js = options.include?(:js) ? options.delete(:js) : request.xhr?
101
103
 
@@ -132,7 +134,7 @@ module RecordSelectHelper
132
134
  options[:controller] ||= current.first.class.to_s.pluralize.underscore
133
135
  options[:params] ||= {}
134
136
  options[:id] ||= name.gsub(/[\[\]]/, '_')
135
- options[:class] ||= String.new
137
+ options[:class] = options[:class] ? options[:class].dup : String.new
136
138
  options[:class] << ' recordselect'
137
139
  options.delete(:name)
138
140
  js = options.include?(:js) ? options.delete(:js) : request.xhr?
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RecordSelect
2
4
  module Version
3
5
  MAJOR = 4
4
6
  MINOR = 0
5
- PATCH = 13
7
+ PATCH = 15
6
8
 
7
9
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
10
  end
data/lib/record_select.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RecordSelect
2
4
  def self.included(base)
3
5
  base.send :extend, ClassMethods
data/lib/recordselect.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'record_select'
2
4
  require 'record_select/extensions/localization'
3
5
  require 'record_select/extensions/active_record'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'rubygems'
2
4
  require 'test/unit'
3
5
  require 'active_support'
metadata CHANGED
@@ -1,31 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recordselect
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.13
4
+ version: 4.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Cambra
8
8
  - Volker Hochstein
9
9
  - Lance Ivy
10
- autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2026-07-15 00:00:00.000000000 Z
12
+ date: 1980-01-02 00:00:00.000000000 Z
14
13
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: bundler
17
- requirement: !ruby/object:Gem::Requirement
18
- requirements:
19
- - - "~>"
20
- - !ruby/object:Gem::Version
21
- version: 1.0.0
22
- type: :development
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- requirements:
26
- - - "~>"
27
- - !ruby/object:Gem::Version
28
- version: 1.0.0
29
14
  - !ruby/object:Gem::Dependency
30
15
  name: rails
31
16
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +67,6 @@ homepage: http://github.com/scambra/recordselect
82
67
  licenses:
83
68
  - MIT
84
69
  metadata: {}
85
- post_install_message:
86
70
  rdoc_options: []
87
71
  require_paths:
88
72
  - lib
@@ -97,8 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
81
  - !ruby/object:Gem::Version
98
82
  version: '0'
99
83
  requirements: []
100
- rubygems_version: 3.5.11
101
- signing_key:
84
+ rubygems_version: 3.6.9
102
85
  specification_version: 4
103
86
  summary: RecordSelect widget as a replacement for massive drop down lists
104
87
  test_files: