Skip to content

Commit

Permalink
Merge pull request #1496 from 8398a7/develop
Browse files Browse the repository at this point in the history
refactoring
  • Loading branch information
8398a7 authored Nov 1, 2024
2 parents 76c0e37 + 225a4d4 commit 0fb6a67
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ def react_component_wrapper(component, props = {})
react_component component, props
end

def render_ads?
return true unless current_user

!(current_user.admin? || current_user.skip_ad?)
end

def recent_link(iidxid)
user = User.find_by_iidxid(iidxid)
return false unless user
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ html
gtag('config', 'UA-56797171-1');
gtag('set', { user_id: '#{current_user ? current_user.id : -1}' });
- if render_ads?
- if !current_user&.skip_ad?
script async=true crossorigin='anonymous' src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5751776715932993'

= favicon_link_tag 'favicon.ico'
Expand Down

0 comments on commit 0fb6a67

Please sign in to comment.