Skip to content

Commit cc5d686

Browse files
committed
avoid request.env with passenger
1 parent 8e62b78 commit cc5d686

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/views/layouts/_common_head.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<%= render 'layouts/seo' %>
1414

1515
<%# todo: Is there a way to play nicer with thredded's jquery? %>
16-
<% unless request.env.fetch('REQUEST_PATH', '').start_with?('/forum') %>
16+
<% unless request.fullpath.start_with?('/forum') %>
1717
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-ujs/1.2.2/rails.min.js" integrity="sha256-BbyWhCn0G+F6xbWJ2pcI5LnnpsnpSzyjJNVtl7ABp+M=" crossorigin="anonymous"></script>
1818
<% end %>
1919

lib/extensions/thredded/topic.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def self.text_color
2727
end
2828

2929
def notify_discord
30-
NotifyDiscordOfThreadJob.set(wait: 1.minute).perform_later(self.id)
30+
NotifyDiscordOfThreadJob.set(wait: 1.minute).perform_later(self.id) if Rails.env.production?
3131
end
3232

3333
def create_content_page_share

0 commit comments

Comments
 (0)