Skip to content

Commit

Permalink
Support both Rails 6 and Rails 7
Browse files Browse the repository at this point in the history
  • Loading branch information
rickselby committed Mar 5, 2024
1 parent ff8a464 commit c8e9c79
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/generators/rspec/scaffold/scaffold_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ def banner
end

def show_helper(arg = file_name, type: :url)
super
if Rails::VERSION::STRING.to_f >= 7.0
super
else
"#{singular_route_name}_url(#{arg})"
end
end
end
end
Expand Down

0 comments on commit c8e9c79

Please sign in to comment.