class ThingsController < ApplicationController
expose :thing
def new
thing.author = 'John Doe'
end
private
def thing_params
params.require(:thing).permit(:foo, :bar)
end
end
When exposed object is called in controller action and somebody sends HEAD request instead of GET it raises error:
ActionController::ParameterMissing (param is missing or the value is empty: thing):
Hi everyone.
When exposed object is called in controller action and somebody sends
HEAD
request instead ofGET
it raises error:because DecentExposure::Behavior#build_params returns empty hash only for
GET
requests.It doesn't look like a big problem but anyway it's a bit annoying. Can we change this logic?
Thx