module ViewModel::Controller
def _extract_param_hash(data)
def _extract_param_hash(data) case data when Hash data when ActionController::Parameters data.to_unsafe_h else raise ViewModel::Error.new(status: 400, detail: "Invalid data submitted, expected hash: #{data.inspect}") end end