rails_wordpress 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1d4d8418b4cd856648badaffd5b4cea54c2ab20
4
- data.tar.gz: 707642f01f491c2d3acdf9732f65501c4eb8c034
3
+ metadata.gz: c92cb07fc3f6a7748f72e72b7e74ac6c49304e8f
4
+ data.tar.gz: c187f8e12554193429ffddea2e424521c971047e
5
5
  SHA512:
6
- metadata.gz: 24840fbe38cf5cca5b6d3cc14843ec8e6f7fb96be88e608f252bb4300605b94195603eb819e3ba99e4a96be8f4b9ea22c530b3d7c0d87c9d01793768b81fe02f
7
- data.tar.gz: 95e167bf7e2a11fdca6d21203ee0ac30d141d0ab7440f1c260d26c8a3e31de33b8cd3bd082a1623cdfdccba546958d27c8ea799430f4463c8314e2232e13db4d
6
+ metadata.gz: b3e74de53878a2eac6c9f05abcb063d59d3834814c500f1cbbc2ca4db9cac453c32c81f8b6f66d12510ec63d692f4e6d0edd1fca7893f340ab7016d16aa70ca4
7
+ data.tar.gz: 2ddda16aed9b7e4d43b00198f1d1182ee7b834f77d7d482f19ce13d7ef5b3835beab142b4c774b19b693b219f79390c4dc6ee8af416e0bc2144bf78906e6ff00
@@ -0,0 +1,14 @@
1
+ module Wordpress
2
+ class Railtie < ::Rails::Railtie
3
+ initializer :wordpress do |app|
4
+ if Rails::VERSION::MAJOR >= 5
5
+ options = app.config.active_record
6
+ options.belongs_to_required_by_default = false
7
+
8
+ ActiveSupport.on_load(:active_record) do
9
+ options.each { |k,v| send("#{k}=", v) }
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -1,3 +1,3 @@
1
1
  module Wordpress
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require "rails_wordpress/engine"
2
+ require "rails_wordpress/railtie" if defined?(Rails)
2
3
 
3
4
  module Wordpress
4
5
  end
@@ -18,9 +18,6 @@ module Dummy
18
18
  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
19
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
20
  # config.i18n.default_locale = :de
21
-
22
- # Do not swallow errors in after_commit/after_rollback callbacks.
23
- config.active_record.raise_in_transactional_callbacks = true
24
21
  end
25
22
  end
26
23