Skip to content

Commit

Permalink
Remove slashes from body css classes
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKhorev committed Jan 8, 2025
1 parent 2c1428c commit 44843c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def body_class
if content_for? :body_class
content_for :body_class
else
"#{params[:controller]} #{params[:controller]}-#{params[:action]}"
controller_part = params[:controller].tr("/", "-")
"#{controller_part} #{controller_part}-#{params[:action]}"
end
end

Expand Down

0 comments on commit 44843c1

Please sign in to comment.