Module: Caprese::Serializer::Links::ClassMethods

Defined in:
lib/caprese/serializer/concerns/links.rb

Instance Method Summary collapse

Instance Method Details

#caprese_default_url_options_hostObject

Note:

default_url_options is used to render the host in links that are serialized in the response

Fetches the host from Caprese.config.default_url_options or fails if it is not set



30
31
32
33
34
# File 'lib/caprese/serializer/concerns/links.rb', line 30

def caprese_default_url_options_host
  Caprese.config.default_url_options.fetch(:host) do
    fail 'Caprese requires that config.default_url_options[:host] be set when rendering links.'
  end
end