MS
Size: a a a
MS
MS
bundle update —bundler
помогло в том случаеGV
Gemfile.lock
, я обновил бандлер, и всё накрылосьm
gem install bundler
gem update --system
gem env
и вашей инсталяцией rvmGV
EM
VE
UpdateRecord.new.call(record: user, params: user_params) do |m|
m.success { render json: user, status: 200 }
m.failure { render error_response(422) }
end
ЕЗ
AD
UpdateRecord.new.call(record: user, params: user_params) do |m|
m.success { render json: user, status: 200 }
m.failure { render error_response(422) }
end
case result = UpdateRecord.new.call(record: user, params: user_params)
when Success
render json: user, status: 200
when Failure
render error_response(422)
end
AG
AD
AG
AD
AG
include Dry::Matcher.for(:call, with: Dry::Matcher::ResultMatcher)
AG
SM
UpdateRecord.new.call(record: user, params: user_params) do |m|
m.success { render json: user, status: 200 }
m.failure { render error_response(422) }
end
UpdateRecord.new
.call(record: user, params: user_params)
.either(
-> _success { render json: user, status: 200 },
-> _failure { render error_response(422) }
)
AD
IM
UpdateRecord.new
.call(record: user, params: user_params)
.either(
-> _success { render json: user, status: 200 },
-> _failure { render error_response(422) }
)
AD