{"id":18785646,"url":"https://github.com/dbackowski/rails_simple_exposure","last_synced_at":"2026-05-15T18:34:10.881Z","repository":{"id":56890722,"uuid":"89842703","full_name":"dbackowski/rails_simple_exposure","owner":"dbackowski","description":"Cleanup your Rails controllers.","archived":false,"fork":false,"pushed_at":"2018-11-02T13:56:24.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-20T01:58:47.228Z","etag":null,"topics":["controllers","dry","exposure","rails"],"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/dbackowski.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}},"created_at":"2017-04-30T09:53:32.000Z","updated_at":"2018-11-02T13:56:25.000Z","dependencies_parsed_at":"2022-08-21T00:20:36.385Z","dependency_job_id":null,"html_url":"https://github.com/dbackowski/rails_simple_exposure","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dbackowski/rails_simple_exposure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbackowski%2Frails_simple_exposure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbackowski%2Frails_simple_exposure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbackowski%2Frails_simple_exposure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbackowski%2Frails_simple_exposure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbackowski","download_url":"https://codeload.github.com/dbackowski/rails_simple_exposure/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbackowski%2Frails_simple_exposure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33074861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["controllers","dry","exposure","rails"],"created_at":"2024-11-07T20:49:14.668Z","updated_at":"2026-05-15T18:34:10.859Z","avatar_url":"https://github.com/dbackowski.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RailsSimpleExposure [![Build Status](https://travis-ci.org/dbackowski/rails_simple_exposure.svg?branch=master)](https://travis-ci.org/dbackowski/rails_simple_exposure)\nCleanup your Rails controllers.\n\n## Installation\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'rails_simple_exposure'\n```\n\nAnd then execute:\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n```bash\n$ gem install rails_simple_exposure\n```\n\n## Usage\n\nHere's what a standard Rails CRUD controller using this plugin might look like:\n\n```ruby\nclass BooksController \u003c ApplicationController\n  expose :books, -\u003e { Book.all }\n  expose :book, -\u003e { params[:id].present? ? Book.find(params[:id]) : Book.new }\n\n  def create\n    book.attributes = book_params\n\n    respond_to do |format|\n      if book.save\n        format.html { redirect_to book, notice: 'Book was successfully created.' }\n        format.json { render :show, status: :created, location: book }\n      else\n        format.html { render :new }\n        format.json { render json: book.errors, status: :unprocessable_entity }\n      end\n    end\n  end\n\n  def update\n    respond_to do |format|\n      if book.update(book_params)\n        format.html { redirect_to book, notice: 'Book was successfully updated.' }\n        format.json { render :show, status: :ok, location: book }\n      else\n        format.html { render :edit }\n        format.json { render json: book.errors, status: :unprocessable_entity }\n      end\n    end\n  end\n\n  def destroy\n    book.destroy\n    respond_to do |format|\n      format.html { redirect_to books_url, notice: 'Book was successfully destroyed.' }\n      format.json { head :no_content }\n    end\n  end\n\n  private\n  def book_params\n    params.require(:book).permit(:title)\n  end\nend\n\n```\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 a new Pull Request\n\n## License\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbackowski%2Frails_simple_exposure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbackowski%2Frails_simple_exposure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbackowski%2Frails_simple_exposure/lists"}