Skip to content

Commit

Permalink
doing site lookups with port. fixes #554
Browse files Browse the repository at this point in the history
  • Loading branch information
GBH committed Mar 5, 2015
2 parents d42c16e + cdc981c commit ccbed33
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ rvm:
- 1.9.3
- 2.0.0
- 2.1.5
- 2.2.0
- 2.2.1
gemfile:
- test/gemfiles/Gemfile.rails.4.0
- test/gemfiles/Gemfile.rails.4.1
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/comfy/cms_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def cms_hook(name, options = {})
# <% end %>
def cms_snippet_content(identifier, cms_site = @cms_site, &block)
unless cms_site
host, path = request.host.downcase, request.fullpath if respond_to?(:request) && request
host, path = request.host_with_port.downcase, request.fullpath if respond_to?(:request) && request
cms_site = Comfy::Cms::Site.find_site(host, path)
end
return '' unless cms_site
Expand Down
2 changes: 1 addition & 1 deletion lib/comfortable_mexican_sofa/render_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def render(options = {}, locals = {}, &block)
end

if (page_path = options.delete(:cms_page)) || (layout_identifier = options.delete(:cms_layout))
unless @cms_site ||= Comfy::Cms::Site.find_site(request.host.downcase, request.fullpath)
unless @cms_site ||= Comfy::Cms::Site.find_site(request.host_with_port.downcase, request.fullpath)
raise ComfortableMexicanSofa::MissingSite.new("#{request.host.downcase}/#{request.fullpath}")
end
end
Expand Down

0 comments on commit ccbed33

Please sign in to comment.