lib/jsonapi/relationship.rb in jsonapi-resources-0.10.0.beta5 vs lib/jsonapi/relationship.rb in jsonapi-resources-0.10.0.beta6

- old
+ new

@@ -5,10 +5,12 @@ :parent_resource, :eager_load_on_include, :custom_methods, :inverse_relationship, :allow_include attr_writer :allow_include + attr_accessor :_routed, :_warned_missing_route + def initialize(name, options = {}) @name = name.to_s @options = options @acts_as_set = options.fetch(:acts_as_set, false) == true @foreign_key = options[:foreign_key] ? options[:foreign_key].to_sym : nil @@ -25,10 +27,13 @@ @eager_load_on_include = options.fetch(:eager_load_on_include, false) == true @allow_include = options[:allow_include] @class_name = nil @inverse_relationship = nil - exclude_links(options.fetch(:exclude_links, :none)) + @_routed = false + @_warned_missing_route = false + + exclude_links(options.fetch(:exclude_links, JSONAPI.configuration.default_exclude_links)) # Custom methods are reserved for future use @custom_methods = options.fetch(:custom_methods, {}) end