module Caprese::Serializer::Links::ClassMethods

Public Instance Methods

caprese_default_url_options_host() click to toggle source

Fetches the host from Caprese.config.default_url_options or fails if it is not set @note default_url_options is used to render the host in links that are serialized in the response

# 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