{"id":15064648,"url":"https://github.com/uxxman/snaky_params","last_synced_at":"2026-01-02T12:54:35.716Z","repository":{"id":56896316,"uuid":"101758268","full_name":"uxxman/snaky_params","owner":"uxxman","description":"Rack middleware for Rails that automatically converts request parameter keys to snake_case.","archived":false,"fork":false,"pushed_at":"2018-09-28T10:43:19.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-20T10:23:24.945Z","etag":null,"topics":["api","rails","ruby","ruby-on-rails","snake-case"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uxxman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-29T12:23:47.000Z","updated_at":"2018-09-28T10:43:20.000Z","dependencies_parsed_at":"2022-08-21T00:50:53.878Z","dependency_job_id":null,"html_url":"https://github.com/uxxman/snaky_params","commit_stats":null,"previous_names":["uxman-sherwani/snaky_params"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uxxman%2Fsnaky_params","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uxxman%2Fsnaky_params/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uxxman%2Fsnaky_params/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uxxman%2Fsnaky_params/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uxxman","download_url":"https://codeload.github.com/uxxman/snaky_params/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243790999,"owners_count":20348385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","rails","ruby","ruby-on-rails","snake-case"],"created_at":"2024-09-25T00:23:30.737Z","updated_at":"2026-01-02T12:54:35.633Z","avatar_url":"https://github.com/uxxman.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SnakyParams\n\n[![Gem Version](https://badge.fury.io/rb/snaky_params.svg)](https://badge.fury.io/rb/snaky_params)\n\nSnakyParams is Rack middleware for Rails that automatically converts request parameter keys to snake_case. \n\nThis is useful if you Rails app is being used as an API for a front-end application written in any other language (e.g. JavaScript). In Ruby and Rails, the widely adopted naming convention is to use `snake_case` for variables, keys etc. Popular JavaScript style guides (such as the [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript)) tend to recommend camelCase. This gem allows you to use snake_case in all Ruby/Rails code without having to worry about converting the case of parameter names or having non-conventional names.\n\n## Installation\n\n1. Add this line to your application's Gemfile and execute `bundle install`:\n\n```ruby\ngem 'snaky_params'\n```\n\n2. Add this line **as the last config** to `config/application.rb`:\n\n```ruby\nconfig.middleware.use SnakyParams::Middleware\n```\n\n## Usage\n\nConversion is automatic. All query, post, put and patch parameter keys in requests to your Rails application are converted to snake_case.\n\nExample:\n- `searchQuery` becomes `search_query`\n- `FirstName` becomes `first_name`\n- `last-name` becomes `last_name`\n- `monthlyOrYearlySalary` becomes `monthly_or_yearly_salary`\n\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/uxman-sherwani/snaky_params.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuxxman%2Fsnaky_params","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuxxman%2Fsnaky_params","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuxxman%2Fsnaky_params/lists"}