diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2018-01-06 18:13:29 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2018-01-06 18:13:29 +0100 |
commit | e1b7c417707c656c5bd2a41c6fa426e7dc94e97d (patch) | |
tree | 8505dcada50f01244e54c2150d998872a8671a48 | |
parent | b93d0bf68c25d266c6106e09bafbfd565296b76a (diff) | |
download | hmnoweb-e1b7c417707c656c5bd2a41c6fa426e7dc94e97d.tar.gz hmnoweb-e1b7c417707c656c5bd2a41c6fa426e7dc94e97d.tar.bz2 hmnoweb-e1b7c417707c656c5bd2a41c6fa426e7dc94e97d.zip |
Consider relative root when matching gallery_links url to page.
-rw-r--r-- | vendor/extensions/gallery_links/app/controllers/refinery/gallery_links/gallery_links_controller.rb | 5 |
1 files changed, 4 insertions, 1 deletions
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 |