You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# api/v1/users.rb, includes defaults
params do
requires :id, types: String, desc: 'User ID'
end
route_param :id do
before do
@user = User.where(id: params[:id]).first!
end
desc 'Update a user'
params do
optional :first_name, type: String, desc: 'First Name'
optional :last_name, type: String, desc: 'Last Name'
optional :email, type: String, desc: 'Email Address'
end
patch do
@user.update(params)
end
end
Any suggestions greatly appreciated!
The text was updated successfully, but these errors were encountered:
I've tried getting it to serialize ActiveModel errors, but to no avail.
Here's what I've got going on..
I've tried both of these for good measure.
Any suggestions greatly appreciated!
The text was updated successfully, but these errors were encountered: