It is enough to have a blank foreign key in order to return the default value.
…in a non-persisted record. Error: ``` 1) Her::Model::Associations handling associations without details returns nil if the foreign key is nil Failure/Error: @user_without_organization_and_not_persisted.organization.should be_nil Faraday::Adapter::Test::Stubs::NotFound: no stubbed request for get /organizations # ./lib/her/api.rb:94:in `request' # ./lib/her/model/http.rb:56:in `request' # ./lib/her/model/http.rb:81:in `get_raw' # ./lib/her/model/http.rb:70:in `get' # ./lib/her/model/associations/belongs_to_association.rb:84:in `fetch' # ./lib/her/model/associations/association_proxy.rb:11:in `nil?' # ./lib/her/model/associations/association_proxy.rb:40:in `method_missing' # ./spec/model/associations_spec.rb:215:in `block (3 levels) in <top (required)>' ```
…e rails security fixes
…ot_in_json, primary_key, or root_element with Her::JsonApiModel