Skip to content

Instantly share code, notes, and snippets.

@stephenmckinney
Created November 21, 2016 19:30
Show Gist options
  • Save stephenmckinney/04d0ae5302b0b48891d8e3c682c47c4b to your computer and use it in GitHub Desktop.
Save stephenmckinney/04d0ae5302b0b48891d8e3c682c47c4b to your computer and use it in GitHub Desktop.
diff --git a/lib/presto/serializer/mixins/entries.rb b/lib/presto/serializer/mixins/entries.rb
index 087f6b8..2ab89e1 100644
--- a/lib/presto/serializer/mixins/entries.rb
+++ b/lib/presto/serializer/mixins/entries.rb
@@ -125,7 +125,7 @@ module Presto::Serializer::Mixins::Entries
:timestamp => entry.modified_date.to_i, # seconds since Jan 1 1970 00:00:00 UTC
:title => entry.title_plain,
:type => entry.type,
- :url => SbnUrls.url_for_entry(entry, {:current_community => context.current_community}),
+ :url => SbnUrls.url_for_entry(entry, {:community => context.current_community}),
:entry_layout => serialize_entry_layout(entry),
# /placeable interface
:additional_byline_credits => serialize_entry_sources(entry, byline_only: true),
diff --git a/lib/sbn_urls.rb b/lib/sbn_urls.rb
index 1464563..75e840f 100644
--- a/lib/sbn_urls.rb
+++ b/lib/sbn_urls.rb
@@ -141,11 +141,6 @@ module SbnUrls
end
def self.url_for_entry(entry, opts={})
- current_community ||= opts[:current_community]
- if (entry.community.network.voxcreative? || entry.community.network.voxcreativenext?) && current_community
- opts[:community] ||= current_community
- end
-
community = opts[:community] || entry.community
# This will ensure nothing breaks with legacy code. Only run this if we are
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment