{"id":21201659,"url":"https://github.com/oleander/to_param-rb","last_synced_at":"2026-02-16T19:35:02.136Z","repository":{"id":6438358,"uuid":"7677224","full_name":"oleander/to_param-rb","owner":"oleander","description":"A one-liner solution for ActiveRecord::Base#to_param","archived":false,"fork":false,"pushed_at":"2025-02-12T20:08:55.000Z","size":35,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-17T12:57:10.470Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/oleander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-01-18T00:22:24.000Z","updated_at":"2014-01-12T21:05:32.000Z","dependencies_parsed_at":"2025-03-15T05:15:36.862Z","dependency_job_id":null,"html_url":"https://github.com/oleander/to_param-rb","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/oleander/to_param-rb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fto_param-rb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fto_param-rb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fto_param-rb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fto_param-rb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oleander","download_url":"https://codeload.github.com/oleander/to_param-rb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oleander%2Fto_param-rb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29516169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T18:37:19.720Z","status":"ssl_error","status_checked_at":"2026-02-16T18:36:46.920Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-20T20:10:23.308Z","updated_at":"2026-02-16T19:35:02.113Z","avatar_url":"https://github.com/oleander.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# to_param\n\nA one-liner solution for `ActiveRecord::Base#to_param`.\n\n## Usage\n\n### Default format\n\n``` ruby\nclass User \u003c ActiveRecord::Base\n  # ...\n  to_param :name\nend\n\nUser.create(name: \"Linus\").to_param # =\u003e \"1-linus\"\n```\n\n### Custom format\n\n``` ruby\nclass User \u003c ActiveRecord::Base\n  # ...\n  to_param \"Feel-lucky-:name\"\nend\n\nUser.create(name: \"punk\").to_param # =\u003e \"feel-lucky-punk\"\n```\n\n### Static value\n\n``` ruby\nclass User \u003c ActiveRecord::Base\n  # ...\n  to_param \"static\"\nend\n\nUser.create(name: \"Linus\").to_param # =\u003e \"static\"\n```\n\n## Note\n\n`ActiveRecord::Base.to_param` uses [#parameterize](http://apidock.com/rails/ActiveSupport/Inflector/parameterize) under the hood, so you don't have to worry about escaping.\n\n## How do install\n\n    [sudo] gem install to_param\n\n## Requirements\n\n*to_param* is tested in *OS X 10.8.2* using Ruby *1.9.2* and Rails *3.2*.\n\n## License\n\n*to_param* is released under the *MIT license*.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleander%2Fto_param-rb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foleander%2Fto_param-rb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foleander%2Fto_param-rb/lists"}