This is a tiny railtie that patches your ApplicationController and sets up deep snake_case conversion on the params hash.
Add this line to your application's Gemfile:
gem 'snake_case_params'
And then execute:
$ bundle
class FooController < ApplicationController
# GET /foo?theThing=1234
def index
thing = params[:the_thing] # == 1234
end
end
- Fork it ( https://github.com/practicefusion.com/snake\_case\_params )
- Create your feature branch (
git checkout -b feature/my-new-feature
) - Write new tests for your change
- Write some awesome new feature to satisfy the tests
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/my-new-feature
) - Create a new Pull Request and add some reviewers from recent commit history
To run the unit tests, just execute rake
or rspec spec