module Serega::SeregaPlugins::Root::ClassMethods
Class methods the plugin adds to serializers
Public Instance Methods
(?key root, ?one: key, ?many: key) → void
Source
# File lib/serega/plugins/root/root.rb, line 70 def root(root = nil, one: nil, many: nil) one ||= root many ||= root config.root = {one: one, many: many} end
Sets the root keys: one key for objects and lists, or separate one: and many: keys
root :users root one: :user, many: :users