Method: Hyperloop::InternalPolicy#filter
- Defined in:
- lib/hyper-operation/transport/policy.rb
#filter(h, attribute_set) ⇒ Object
473 474 475 476 477 478 479 480 481 |
# File 'lib/hyper-operation/transport/policy.rb', line 473 def filter(h, attribute_set) r = {} h.each do |key, value| r[key.to_sym] = value if attribute_set.member?(key.to_sym) || (key.to_sym == :id) end unless attribute_set.empty? #model_id = h[:id] || h["id"] #r[:id] = model_id if model_id && !attribute_set.empty? r end |