-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Param alias #1673
Comments
I think that would be valuable. |
Do you think the first suggestion is better than the below one @dblock? resource :users do
params do
requires :email_address, allow_blank: false, as: :email
requires :password, allow_blank: false
end
post do
User.create!(params)
end
end I just implemented this one Ps: supposing users table has |
I think that if the model takes |
Do you think |
I mean it's what renaming is about ;) |
PS: this currently doesn't seem to work for nested params: group :foo, alias: :bar do
requires :a
end
requires :baz, alias: :cat do
requires :b
end These above both fail. |
@tlabeeuw Can you please see if this is still broken on HEAD? Maybe PR a spec? |
Hi folks, given the following api:
Do you think the following api would be nice? (alias
as:
)The text was updated successfully, but these errors were encountered: