[2.0.0.alpha1] Uninitialized constant Hanami::Controller::Configuration (NameError)
arni1981 opened this issue · comments
I'm trying this snippet from the hanami-controller
unstable branch
require 'hanami/controller'
Hanami::Controller::Configuration.new do |config|
config.default_request_format :json
config.default_response_format :json
end
and this gets me uinitialized constant Hanami::Controller::Configuration (NameError)
@arni1981 You should use Hanami::Action::Configuration
, not Hanami::Controller::Configuration
. This is a breaking change from 2.0.
Yes, I had figured that out, I guess the docs are lagging behind. There are other things not working as well, or I'm not doing them correctly.
For example this doesn't work, no errors, but the configs aren't picked up.
configuration = Hanami::Action::Configuration.new do |config|
config.default_request_format :json
config.default_response_format :json
end
Anyway, this isn't a big deal for me now, I just wanted to help with testing this.