Action Args defaults must not eval to false
Reported by Aaron Wheeler | April 2nd, 2008 @ 04:33 AM | in 1.0 (Nearish Future)
When an action-arg evaluates to false (false, nil, etc) and no parameter is passed in for that arg, then a BadRequest error is returned.
The attached patch doesn't fix this, but it does provide a nicer error message along with some docs on how to work around this issue.
Comments and changes to this ticket
-
Michael Klishin (antares) May 11th, 2008 @ 07:49 AM
- → Milestone changed from to 1.0 (Nearish Future)
- → State changed from new to open
-
Andy Delcambre May 12th, 2008 @ 03:46 PM
Here is a patch that fixes this. First patch to merb, not sure if I broke any conventions. It passes all specs in merb-action-args.
I added a spec for the nil default value.
Comments are welcome.
-
Andy Delcambre May 12th, 2008 @ 04:03 PM
Patch is also on github:
-
Michael Klishin (antares) May 14th, 2008 @ 11:03 AM
- → State changed from open to resolved
- → Assigned user changed from to Michael Klishin (antares)
Applied, thank you.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
