Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opensearch.xml raises on asset_url #810

Closed
jrochkind opened this issue Mar 4, 2014 · 1 comment · Fixed by #821
Closed

opensearch.xml raises on asset_url #810

jrochkind opened this issue Mar 4, 2014 · 1 comment · Fixed by #821
Assignees

Comments

@jrochkind
Copy link
Member

Okay, in my Rails 3.2 based app and BL master, I can't access /catalog/opensearch.xml, getting an error:

 undefined method `asset_url' for #<#<Class:0x007fece85389f0>:0x007fece7359c20>

Here's the line: https://github.com/projectblacklight/blacklight/blob/master/app/views/catalog/opensearch.xml.builder#L5

Now, I'm very confused.

  • i can't figure out why there's no asset_url; debugging, indeed there isn't, although there is an asset_path.
    • Ah, it looks like maybe asset_url was added in Rails4, and isn't there in Rails3.
    • On the other hand, this commit has been in BL since 2011 and BL 3.2, presumably using Rails3, and presumably wasn't broken back then?
    • On top of that, I can't figure out why this isn't failing in our tests, even under Rails 3.2, while in my Rails 3.2 app, it def doesn't work. What?
  • I also am not entirely sure what the right thing for this to be actually doing is; do we really mean to have a favicon.ico in the app assets, accessed as eg http://demo.projectblacklight.org/assets/favicon-edb40a1ef3a8a3a2dc969b521f65bd54.ico -- that's what asset_url does (for instance in demo on Rails4), but normally favicon.ico has to be at root path /favicon.ico, no?

We should prob get opensearch.xml working on rails3 again, but I'm not sure how to. Any suggestions? Anyone wanna try to repro this on rails 3.2? Just make a rails 3.2 app and access /catalog/opensearch.xml.

cbeer added a commit that referenced this issue Mar 10, 2014
@cbeer
Copy link
Member

cbeer commented Mar 10, 2014

$ git log -Sasset_url -- app/helpers

is a handy tool. We used to have a helper for this, and then it was dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants