@svc.before do
recursively_unpermit_hash(params)
end
def recursively_unpermit_hash(h)
h.define_singleton_method(:permitted?) { false }
h.each { |_, v| recursively_unpermit_hash(v) if v.is_a?(Hash) }
end
Created
October 9, 2013 11:16
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment