We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 50355ce + 7ba9284 commit d9b13d2Copy full SHA for d9b13d2
lib/kracken/controllers/json_api_compatible.rb
@@ -176,7 +176,7 @@ def in_transaction
176
# If the data was a Hash, then the single `permit_params` object is returned.
177
# Or the tuple [`id`, `permitd_params`] respectively.
178
def process_params(permitted_params)
179
- single_resource = Hash === data_root
+ single_resource = data_root.respond_to?(:to_hash)
180
data = Array.wrap(data_root)
181
mapping = if params[:id].blank?
182
data.map { |attrs| attrs.permit(permitted_params) }
0 commit comments