Module: HalApi::Representer::Embeds

Extended by:
ActiveSupport::Concern
Included in:
HalApi::Representer
Defined in:
lib/hal_api/representer/embeds.rb

Overview

expects underlying model to have filename, class, and id attributes

Defined Under Namespace

Modules: ClassMethods, Resources

Instance Method Summary collapse

Instance Method Details

#normalize_options!(options) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/hal_api/representer/embeds.rb', line 12

def normalize_options!(options)
  propagated_options, private_options = super(options)

  # we want this to propogate, and be available for `skip_property?`, so don't delete
  private_options[:zoom] = options[:zoom] if options.key?(:zoom)

  [propagated_options, private_options]
end