README.md in sequel-rails-0.9.14 vs README.md in sequel-rails-0.9.15
- old
+ new
@@ -8,11 +8,11 @@
[travis]: http://travis-ci.org/TalentBox/sequel-rails
[codeclimate]: https://codeclimate.com/github/TalentBox/sequel-rails
This gem provides the railtie that allows
[sequel](http://github.com/jeremyevans/sequel) to hook into
-[Rails (3.x and 4.x)](http://github.com/rails/rails) and thus behave like a
+[Rails (3.x, 4.x and 5.x)](http://github.com/rails/rails) and thus behave like a
rails framework component. Just like activerecord does in rails,
[sequel-rails](http://github.com/talentbox/sequel-rails) uses the railtie API to
hook into rails. The two are actually hooked into rails almost identically.
The code for this gem was initially taken from the excellent
@@ -26,11 +26,12 @@
[brasten](https://github.com/brasten) proposed us.
Using sequel-rails
==================
-Using sequel with Rails (3.x or 4.x) requires a couple minor changes.
+Using sequel with Rails (3.x, 4.x or 5.x) requires a couple minor
+changes.
First, add the following to your Gemfile (after the `Rails` lines):
```ruby
# depending on you database
@@ -49,36 +50,39 @@
```ruby
# require 'rails/all'
# Instead of 'rails/all', require these:
-require "action_controller/railtie"
+require "active_model/railtie"
+require "active_job/railtie"
# require "active_record/railtie"
+require "action_controller/railtie"
require "action_mailer/railtie"
+require "action_view/railtie"
+require "action_cable/engine"
require "sprockets/railtie"
+require "rails/test_unit/railtie
```
Then you need to get rid of `ActiveRecord` configurations, that is if you
didn't generate the new app with `-O` (or the long form `--skip-active-record`):
-`config/application.rb` and `config/environments/*.rb`
+For example in a fresh `Rails 5.0.0.1`, you would need to remove those lines:
-For example in a fresh `Rails 4.2.4`, you would need to remove those lines:
-
```
-config/application.rb
-line 27: config.active_record.raise_in_transactional_callbacks = true
+config/initializers/new_framework_defaults.rb
+line 18: Rails.application.config.active_record.belongs_to_required_by_default = true
```
```
config/environments/development.rb
-line 23: config.active_record.migration_error = :page_load
+line 38: config.active_record.migration_error = :page_load
```
```
config/environments/production.rb
-line 78: config.active_record.dump_schema_after_migration = false
+line 85: config.active_record.dump_schema_after_migration = false
```
Starting with sequel-rails 0.4.0.pre3 we don't change default Sequel behaviour
nor include any plugin by default, if you want to get back the previous
behaviour, you can create a new initializer (eg: `config/initializers/sequel.rb`)
@@ -390,9 +394,11 @@
* Larivact (@Larivact)
* Jan Berdajs (@mrbrdo)
* Lukas Fittl (@lfittl)
* Jordan Owens (@jkowens)
* Pablo Herrero (@pabloh)
+* Henre Botha (@henrebotha)
+* Mohammad Satrio (@tyok)
Credits
=======
The [dm-rails](http://github.com/datamapper/dm-rails) team wrote most of the original code, I just sequel-ized it, but since then most of it has been either adapted or rewritten.