-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
I don't have an idea for the best syntax but I find myself loading models from the params hash a lot. What if you were able to do something like this?
params do
requires :user_id, identifies: User
end
get 'users/:user_id' do
params[:user] # params calls User.find internally and raises the appropriate error if nothing is found
endThoughts?