Skip to content

Commit 2bce17c

Browse files
Alex TharpAlex Tharp
authored andcommitted
Merge pull request #260 from cbdr/fix-find-by-protocol-agnostic-url
Fix find_by_protocol_agnostic_url
2 parents afb247d + fa5a1bf commit 2bce17c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/interactors/get_webpage_feed.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class GetWebpageFeed
44
def call
55
webpage = ::Webpage
66
webpage = webpage.find_by_tenant_id(context.tenant) if context.tenant
7-
webpage = webpage.find_by_protocol_agnostic_url(protocol_agnostic_url(context.params.url))
7+
webpage = webpage.find_by_protocol_agnostic_url(protocol_agnostic_url(context.params.url)).first
88
context.webpage = webpage
99
end
1010

app/models/webpage.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class Webpage < ActiveRecord::Base
22
include FindByTenant
33
include SearchableWebpage
44

5-
scope :find_by_protocol_agnostic_url, ->(suffix) { where('url LIKE :suffix', query: "%#{suffix}") }
5+
scope :find_by_protocol_agnostic_url, ->(suffix) { where('url LIKE :suffix', suffix: "%#{suffix}") }
66

77
acts_as_paranoid
88
acts_as_taggable_on :seo_keywords

0 commit comments

Comments
 (0)