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

Do not explicitly require jquery-rails #785

Merged
merged 1 commit into from
Apr 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## master / unreleased

* [FEATURE] Drop Ruby 2.3 support
* [FEATURE] Do not require `jquery-rails` gem ([#785](https://github.com/DavyJonesLocker/client_side_validations/pull/785))
* [FEATURE] Add support for many association validations ([#783](https://github.com/DavyJonesLocker/client_side_validations/pull/783))

## 16.2.0 / 2020-04-10
Expand Down
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,26 @@ attach its event handlers.

#### When using Sprockets ####

Make sure that you are requiring jQuery.
Since ClientSideValidations can also be used via webpacker, it does not require
by default `jquery-rails` gem.

Make sure that `jquery-rails` is part of your bundled gems and `application.js`,
otherwise add:

```ruby
gem 'jquery-rails', '~> 4.3'
```

to your `Gemfile`, run `bundle`, and add

```js
//= require jquery
```

to your `app/assets/javascripts/application.js` file.

Add the following to your `app/assets/javascripts/application.js` file.
Then, add the following to your `app/assets/javascripts/application.js` file
after `//= require jquery`.

```js
//= require rails.validations
Expand Down
1 change: 0 additions & 1 deletion client_side_validations.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Gem::Specification.new do |spec|

spec.add_dependency 'rails', '>= 5.0.0.1', '< 6.1'

spec.add_dependency 'jquery-rails', '~> 4.3'
spec.add_dependency 'js_regex', '~> 3.1'

spec.add_development_dependency 'appraisal', '~> 2.2'
Expand Down