Skip to content

Commit

Permalink
re-add #asset_url helper (removed in 12fed9a)
Browse files Browse the repository at this point in the history
fixes #810
  • Loading branch information
cbeer committed Mar 10, 2014
1 parent 74f6e52 commit a699dd9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/helpers/blacklight/url_helper_behavior.rb
Expand Up @@ -215,4 +215,9 @@ def remove_facet_params(field, item, source_params=params)
p
end

end
if ::Rails.version < "4.0"
def asset_url *args
"#{request.protocol}#{request.host_with_port}#{asset_path(*args)}"
end
end
end
10 changes: 10 additions & 0 deletions spec/views/catalog/opensearch.xml.builder_spec.rb
@@ -0,0 +1,10 @@
require 'spec_helper'

describe 'catalog/opensearch.xml.builder' do
it "should render an OpenSearch description document" do
render
doc = Nokogiri::XML.parse(rendered)
doc.remove_namespaces!
expect(doc.xpath('/OpenSearchDescription').length).to eq 1
end
end

0 comments on commit a699dd9

Please sign in to comment.