Skip to content

Commit

Permalink
fix[ui]: cast url to string in active style
Browse files Browse the repository at this point in the history
  • Loading branch information
puglet5 committed Nov 10, 2023
1 parent 99d4e88 commit 6fd7607
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def set_copyright
end

def get_controller(url)
Rails.application.routes.recognize_path(url)[:controller]
Rails.application.routes.recognize_path(url.to_s)[:controller]
end

def active?(controller, url, klass)
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_application_nav.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<path d="M4 12v6a8 3 0 0 0 16 0v-6"></path>
</svg>
<p class="hidden lg:block">
<% unless Rails.application.routes.recognize_path(:samples)[:controller] == params[:controller] %>
<% unless Rails.application.routes.recognize_path("samples")[:controller] == params[:controller] %>
ITMO Heritage Science DB
<% else %>
ITMO Reference Spectra DB
Expand Down

0 comments on commit 6fd7607

Please sign in to comment.