SnakeParams
SnakeParams is a module that helps smoothing out the differences in naming conventions between the front-end (camelCase) and the back-end (snake_case) in Rails.
Installation
Add this line to your application's Gemfile:
gem 'snake_params'
And then execute:
$ bundle
Or install it yourself as:
$ gem install snake_params
Usage
To start using the camelCase to snake_case conversion, just include this module in your Rails controller:
include ::SnakeParams
Contributing
- Fork it ( https://github.com/panorama-ed/snake_params/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Make sure your changes have appropriate tests (bundle exec rspec)
and conform to the Rubocop style specified. We use
overcommit to enforce good code.
Documentation
For more information, check the project's Ruby Docs.
