Skip to content

Commit c8e9c79

Browse files
committed
Support both Rails 6 and Rails 7
1 parent ff8a464 commit c8e9c79

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/generators/rspec/scaffold/scaffold_generator.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,11 @@ def banner
129129
end
130130

131131
def show_helper(arg = file_name, type: :url)
132-
super
132+
if Rails::VERSION::STRING.to_f >= 7.0
133+
super
134+
else
135+
"#{singular_route_name}_url(#{arg})"
136+
end
133137
end
134138
end
135139
end

0 commit comments

Comments
 (0)