about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-12-06 07:04:49 +0100
committerYamagishi Kazutoshi <ykzts@desire.sh>2017-12-06 15:04:49 +0900
commit42bcbd36b72c7ddc5ae1ecced09614863ca382bd (patch)
tree851a64a7930cccdcda924bc12f0493e3fb22ecf1 /config/initializers
parent0393a64a90c2dee17e7a9d0c1481fd4155825b85 (diff)
Remove rabl dependency (#5894)
* Remove rabl dependency

* Replicate old Oj configuration
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/oj.rb1
-rw-r--r--config/initializers/rabl_init.rb7
2 files changed, 1 insertions, 7 deletions
diff --git a/config/initializers/oj.rb b/config/initializers/oj.rb
new file mode 100644
index 000000000..de3e17f2e
--- /dev/null
+++ b/config/initializers/oj.rb
@@ -0,0 +1 @@
+Oj.default_options = { mode: :compat, time_format: :ruby, use_to_json: true }
diff --git a/config/initializers/rabl_init.rb b/config/initializers/rabl_init.rb
deleted file mode 100644
index 132a42144..000000000
--- a/config/initializers/rabl_init.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-Rabl.configure do |config|
-  config.json_engine       = Oj
-  config.cache_all_output  = false
-  config.cache_sources     = Rails.env.production?
-  config.include_json_root = false
-  config.view_paths        = [Rails.root.join('app/views')]
-end