Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/her/model/parse.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module ClassMethods
# @param [Hash] data
# @private
def parse(data)
if parse_root_in_json? && root_element_included?(data)
if parsed_root_element && root_element_included?(data)
if json_api_format?
data.fetch(parsed_root_element).first
else
Expand Down Expand Up @@ -139,7 +139,7 @@ def root_element(value = nil)

# @private
def root_element_included?(data)
data.keys.to_s.include? @_her_root_element.to_s
data.keys.map(&:to_s).include? @_her_root_element.to_s
end

# @private
Expand Down