I have an action which should return JSON request.
accept :json to my action, and
format :json to my corresponding view.
But during json request, hanami fails with error because of no view found.
After I specified format inside
call method of the action, it started working:
def call(params) self.format = :json end
So I was wondering if it is correct behaviour and why do I need to specify
accept :json in this case?