Use RABL to build JSON responses given by API
This commit is contained in:
16
config/initializers/rabl_init.rb
Normal file
16
config/initializers/rabl_init.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
Rabl.configure do |config|
|
||||
# Commented as these are defaults
|
||||
# config.cache_sources = false
|
||||
# config.json_engine = nil # Any multi\_json engines
|
||||
# config.msgpack_engine = nil # Defaults to ::MessagePack
|
||||
# config.bson_engine = nil # Defaults to ::BSON
|
||||
# config.plist_engine = nil # Defaults to ::Plist::Emit
|
||||
# config.include_json_root = true
|
||||
config.include_json_root = false
|
||||
# config.include_msgpack_root = true
|
||||
# config.include_bson_root = true
|
||||
# config.include_plist_root = true
|
||||
# config.include_xml_root = false
|
||||
# config.enable_json_callbacks = false
|
||||
# config.xml_options = { :dasherize => true, :skip_types => false }
|
||||
end
|
Reference in New Issue
Block a user