From e1b7c417707c656c5bd2a41c6fa426e7dc94e97d Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 6 Jan 2018 18:13:29 +0100 Subject: Consider relative root when matching gallery_links url to page. --- .../controllers/refinery/gallery_links/gallery_links_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'vendor/extensions/gallery_links/app') diff --git a/vendor/extensions/gallery_links/app/controllers/refinery/gallery_links/gallery_links_controller.rb b/vendor/extensions/gallery_links/app/controllers/refinery/gallery_links/gallery_links_controller.rb index c6a4e7e..8fcbdbe 100644 --- a/vendor/extensions/gallery_links/app/controllers/refinery/gallery_links/gallery_links_controller.rb +++ b/vendor/extensions/gallery_links/app/controllers/refinery/gallery_links/gallery_links_controller.rb @@ -23,10 +23,13 @@ module Refinery def find_all_gallery_links @gallery_links = GalleryLink.order('position ASC') + logger.debug "Found #{@gallery_links.length} galleries..." end def find_page - @page = ::Refinery::Page.where(:link_url => "/gallery_links").first + @page = ::Refinery::Page.where( + :link_url => "#{ENV['RAILS_RELATIVE_URL_ROOT']}/gallery_links") + .first end end -- cgit v1.2.3