Skip to content

Commit

Permalink
Support Ruby 3
Browse files Browse the repository at this point in the history
  • Loading branch information
sk-ys committed Nov 30, 2023
1 parent 11d8764 commit 65cb995
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/like/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ def view_issues_history_journal_bottom(context={})
def view_layouts_base_content(context={})
request = context[:request]
if context[:controller].controller_name == 'wiki' && context[:controller].action_name == 'show' then
wiki_title = URI.decode(request.path.split("/").last)
str = URI.decode(request.path.split("/projects/").last)
identifier = str.split("/wiki/").first
wiki_title = URI.decode_www_form(request.path.split("/").last)
identifier = context[:project].identifier
wiki_pages = WikiPage.where(title: wiki_title)
for wiki_page in wiki_pages do
if wiki_page.project.identifier == identifier then
Expand Down

0 comments on commit 65cb995

Please sign in to comment.