Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Dependency on jQuery #23

Open
frankieroberto opened this issue Nov 17, 2017 · 2 comments
Open

Dependency on jQuery #23

frankieroberto opened this issue Nov 17, 2017 · 2 comments

Comments

@frankieroberto
Copy link
Contributor

I just tried to use this gem, and got a javascript error because our project doesn’t use jQuery. I've created a separate PR (#22) to add a note about this to the README, however I think it might be worth considering one of the following:

  • rewriting the javascript to not require jQuery (this would be my preference, and it’s not a huge job)
  • adding a dependency on the jquery-rails gem to the Gemspec (pros: makes the dependency explicit, cons: means people have to use the jQuery gem, even if they don't want to use jQuery, or want to include it via some other mechanism).
  • adding some detection of jQuery within the javascript (via something like if (typeof jQuery != 'undefined')) to avoid raising errors if it isn’t (maybe log a warning instead).
@aliuk2012
Copy link
Contributor

Hi @frankieroberto ,

Thanks for raising this issue. I agree we should really remove the jQuery dependency. I'll take a look at removing the jQuery dependency and add some tests too.

👍

@frankieroberto
Copy link
Contributor Author

@aliuk2012 ah great, thanks. That would make the gem a lot more reusable!

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

No branches or pull requests

2 participants