{"id":15792886,"url":"https://github.com/getsimpleadmin/simple_crudify","last_synced_at":"2025-05-12T14:03:35.131Z","repository":{"id":56895707,"uuid":"166682590","full_name":"getsimpleadmin/simple_crudify","owner":"getsimpleadmin","description":"The simple_crudify gem is a lightweight library for writing simple CRUD controllers.","archived":false,"fork":false,"pushed_at":"2024-10-03T09:07:55.000Z","size":19,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-22T23:17:30.192Z","etag":null,"topics":["crud-controllers","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getsimpleadmin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-01-20T16:23:28.000Z","updated_at":"2019-07-29T15:34:45.000Z","dependencies_parsed_at":"2024-10-22T13:13:10.482Z","dependency_job_id":null,"html_url":"https://github.com/getsimpleadmin/simple_crudify","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"b35e708d25924815c70ff05202ebc62c333925d2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsimpleadmin%2Fsimple_crudify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsimpleadmin%2Fsimple_crudify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsimpleadmin%2Fsimple_crudify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsimpleadmin%2Fsimple_crudify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getsimpleadmin","download_url":"https://codeload.github.com/getsimpleadmin/simple_crudify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222658899,"owners_count":17018629,"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":["crud-controllers","ruby","ruby-on-rails"],"created_at":"2024-10-04T23:06:35.646Z","updated_at":"2024-11-02T12:07:06.575Z","avatar_url":"https://github.com/getsimpleadmin.png","language":"Ruby","readme":"[![Build Status](https://secure.travis-ci.org/getsimpleadmin/simple_crudify.svg?branch=master)](http://travis-ci.org/getsimpleadmin/simple_crudify)[![Gem Version](https://badge.fury.io/rb/simple_crudify.svg)](https://rubygems.org/gems/simple_crudify)\n# SimpleCrudify\n\nThe simple_crudify gem is a lightweight library for writing simple CRUD controllers.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'simple_crudify'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install simple_crudify\n\n## Usage\n\nA short example\n\n```ruby\nclass UsersController \u003c ApplicationController\n  include SimpleCrudify::Crudify\n\n  actions :crud\n\n  def model_klass\n    User\n  end\n\n  def controller_notice(action_name)\n    t(\"resource.#{action_name}.success\", resource_name: model_klass)\n  end\n\n  private\n\n  def after_create_path\n    edit_user_path(@resource)\n  end\n\n  def after_update_path\n    users_path\n  end\n\n  def after_destroy_path\n    users_path\n  end\n\n  def resource_params\n    params.require(:user).permit(:password, :phone, :email)\n  end\nend\n```\n\n### Controller configuration\n\nThe first required configuration is an action name.\n\n```ruby\nactions :index, :show, :new, :create\nactions :crud # an alias for all actions\n```\n\nOther settings\n\n```ruby\ndef model_klass\n  User\nend\n```\n\nAllow specifying the model class.\n\n```ruby\n  def controller_notice(action_name)\n    t(\"resource.#{action_name}.success\", resource_name: model_klass)\n  end\n```\n\nHelps to simplify controller redirect notice\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/getsimpleadmin/simple_crudify. This project is intended to be a safe, welcoming space for collaboration.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetsimpleadmin%2Fsimple_crudify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetsimpleadmin%2Fsimple_crudify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetsimpleadmin%2Fsimple_crudify/lists"}