atomaka / railschallenge-city-watch

Our first challenge! Build a JSON API for managing your city's emergency services.
0 stars 0 forks source link

Nice params code! #2

Closed sb8244 closed 6 years ago

sb8244 commented 9 years ago

Hey Andrew. Loved seeing your application controller handling of unpermitted params. I didn't realize that the behavior of how to handle it could be changed like you did. Excellent!

That was the most hacky part of my submission since I handled it manually.

atomaka commented 9 years ago

Thanks, @sb8244! I struggled with this for a bit before discovering that you could raise exceptions on unpermitted parameters via configuration. I eventually refactored after realizing I could set it in the controller. I'm still undecided on which I prefer.

Congratulations on your first place finish!