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

unexpected token & #9

Open
MarianoSalerno opened this issue Nov 18, 2014 · 2 comments
Open

unexpected token & #9

MarianoSalerno opened this issue Nov 18, 2014 · 2 comments

Comments

@MarianoSalerno
Copy link

On page load in active admin with a form with the gem:

Chrome console says:
Uncaught SyntaxError: Unexpected token & - new:89 -> line 89.

Line 89:

 <script type="text/javascript">$(&#x27;.language-tabs-Competition-69838859737240&#x27;).tabs();</script>

That script is auto generated by the gem. Any workaround?

@tommyalvarez
Copy link

+1.

@Slotos
Copy link
Contributor

Slotos commented Nov 26, 2014

First and foremost: Do not use this gem without understanding what it does. Reuse and test the code, but don't blindly rely on the gem. It was created with almost four years old know-how. It was the quickest possible attempt at extracting the code from existing codebase so that my co-workers could reuse it. Only the fact of people using the gem stops me from yanking it away from rubygems repository.

If some day you see a spec/ folder in the tree and see integration tests there, and you can make sense of gem's intentions from those tests, that's when you can rely on it. So far I don't know any gem dealing with ActiveAdmin and Globalize integration, that fits the bill.

Sorry for not delivering some better news, but consider this gem a zombie for now. It might seem to work, but it's dead for some time. When I get time to bang my head against whatever changes Rails and ActiveAdmin introduced in last two years, I will re-write it into a version you can trust.


Having said that, let's get back to the problem at hand. &#x27; is an html escape for single quote. The problem doesn't seem to be common, but you can fix it with .html_safe in a proper location.

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

No branches or pull requests

3 participants