Skip to content

Commit 7ed5cb2

Browse files
committed
support rails 7.1
mainly adjust to changes in AV::Helpers::Tags::Base see rails/rails#48574
1 parent 7c0a69a commit 7ed5cb2

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
ruby: [ '3.0', '3.1', '3.2', '3.3' ]
1313
gemfile:
1414
- Gemfile
15+
- spec/gemfiles/rails-6.1
1516
- spec/gemfiles/rails-7
1617

1718
env:

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ source "https://rubygems.org"
22
gemspec
33

44
gem "thin"
5-
gem "rails", "~> 6.1"
5+
gem "rails", "~> 7.1"

lib/helpers/recurring_select_helper.rb

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,15 @@ def recurring_select_html_options(html_options)
9696
end
9797
end
9898

99-
class RecurringSelectTag < ActionView::Helpers::Tags::Base
99+
class RecurringSelectTag < ActionView::Helpers::Tags::Select
100100
include RecurringSelectHelper::FormOptionsHelper
101101
include SelectHTMLOptions
102102

103103
def initialize(object, method, template_object, default_schedules = nil, options = {}, html_options = {})
104104
@default_schedules = default_schedules
105-
@choices = @choices.to_a if @choices.is_a?(Range)
106-
@method_name = method.to_s
107-
@object_name = object.to_s
108-
@html_options = recurring_select_html_options(html_options)
109-
@template_object = template_object
110-
add_default_name_and_id(@html_options)
111-
112-
super(object, method, template_object, options)
105+
html_options = recurring_select_html_options(html_options)
106+
107+
super(object, method, template_object, @default_schedules, options, html_options)
113108
end
114109

115110
def render

spec/gemfiles/rails-6.1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source "https://rubygems.org"
2+
gemspec path: File.expand_path("../../..", __FILE__)
3+
4+
gem "thin"
5+
gem "rails", "~> 6.1"

0 commit comments

Comments
 (0)