{"id":16643432,"url":"https://github.com/sonots/acts_as_parameter_object","last_synced_at":"2025-04-15T13:48:49.280Z","repository":{"id":9822891,"uuid":"11808126","full_name":"sonots/acts_as_parameter_object","owner":"sonots","description":"Acts as a Prameter Object. cf. Refactoring: Ruby Edition","archived":false,"fork":false,"pushed_at":"2013-08-03T17:12:15.000Z","size":120,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T09:58:48.306Z","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/sonots.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-01T04:40:33.000Z","updated_at":"2025-02-22T19:30:18.000Z","dependencies_parsed_at":"2022-09-05T20:01:22.227Z","dependency_job_id":null,"html_url":"https://github.com/sonots/acts_as_parameter_object","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonots%2Facts_as_parameter_object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonots%2Facts_as_parameter_object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonots%2Facts_as_parameter_object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonots%2Facts_as_parameter_object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonots","download_url":"https://codeload.github.com/sonots/acts_as_parameter_object/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248590005,"owners_count":21129726,"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":[],"created_at":"2024-10-12T08:08:32.250Z","updated_at":"2025-04-15T13:48:49.261Z","avatar_url":"https://github.com/sonots.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# acts_as_parameter_object\n\ntesting ruby: 1.9.3, 2.0.0\n\n## About acts_as_parameter_object\n\nActsAsParameterObject creates a model which acts as a Parameter Object. cf. [Refactoring: Ruby Edition](http://www.amazon.com/dp/0321603508).\n\n## Example\n\n```ruby\nclass ParameterObjectExample\n  include ActsAsParameterObject\n\n  attr_accessor :title\n  validates_presence_of :title\n\n  def initialize(params = {})\n    @title = params[:title]\n  end\nend\n\nParameterObjectExample.new(:foo =\u003e 'bar').valid? #=\u003e false\n```\n\nYou can use all of ActiveModel::Validations methods.\n\nI use a parameter object as a validator model for params coming from rails controller. \nIn contrast to ActiveRecord, this model does not access to the database. \n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new [Pull Request](../../pull/new/master)\n\n## Copyright\n\nCopyright (c) 2013 Naotoshi SEO. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonots%2Facts_as_parameter_object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonots%2Facts_as_parameter_object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonots%2Facts_as_parameter_object/lists"}