{"id":19319718,"url":"https://github.com/hyperoslo/hyper_admin","last_synced_at":"2025-09-07T20:48:38.619Z","repository":{"id":20252425,"uuid":"23525171","full_name":"hyperoslo/hyper_admin","owner":"hyperoslo","description":"Admin solution for Ruby on Rails.","archived":false,"fork":false,"pushed_at":"2015-11-20T10:00:38.000Z","size":983,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":9,"default_branch":"develop","last_synced_at":"2025-07-22T15:51:47.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/hyper_admin","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperoslo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-31T23:17:58.000Z","updated_at":"2020-05-07T13:36:26.000Z","dependencies_parsed_at":"2022-08-20T22:00:32.681Z","dependency_job_id":null,"html_url":"https://github.com/hyperoslo/hyper_admin","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/hyperoslo/hyper_admin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2Fhyper_admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2Fhyper_admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2Fhyper_admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2Fhyper_admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperoslo","download_url":"https://codeload.github.com/hyperoslo/hyper_admin/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2Fhyper_admin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274095051,"owners_count":25221431,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10T01:24:56.196Z","updated_at":"2025-09-07T20:48:38.556Z","avatar_url":"https://github.com/hyperoslo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HyperAdmin\n\nHyperAdmin is an admin interface solution for Ruby on Rails. It works pretty\nmuch as a mountable engine, except it always mounts under _/admin_. This is\ncurrently not configurable.\n\n## Installation\n\nSimply put the gem in your Rails application's Gemfile:\n\n```ruby\ngem 'hyper_admin'\n```\n\nThen, install the bundle as usual:\n\n```\n$ bundle install\n```\n\nFinally, mount HyperAdmin into your application. Put this in your\n_config/routes.rb_ file:\n\n```ruby\nHyperAdmin.routes self\nmount HyperAdmin::Engine, at: '/admin'\n```\n\nAs mentioned above, you must mount it under _/admin_ for the time being. In a\nlater version, this will be configurable.\n\n## Usage\n\nTo register models that should be accessible through the admin, all you need to\ndo is register them with a single line of code. Do this in any Ruby file(s) you\nwant under _app/admin/_, such as _app/admin/article.rb_ or\n_app/admin/person.rb_. When the application boots, HyperAdmin will check each\nfile under the _app/admin/_. To register a resource:\n\n```ruby\nHyperAdmin.register NameOfYourResource\n```\n\nFor instance:\n\n```ruby\nHyperAdmin.register Article\n```\n\nWith this in place, you can now visit _/admin/articles_ in your application and\nstart managing your articles.\n\n### Configuring views\n\nWhen registering resources, it is also possible to customize what fields should\nshow up where and (to some degree) how they should be displayed. For instance,\nwe might want to only show the ID, title and publication date of an article in\nthe index view. For that, we would pass in a block to `register` and specify\nwhich columns to display on the index view, like this:\n\n```ruby\nHyperAdmin.register Article do\n  index do\n    column :id\n    column :title\n    column :published_at\n  end\nend\n```\n\nNote that the order matters here, so this could also be used to force an order\nof attributes to be displayed. In the example above, HyperAdmin would know the\ntypes of the attributes because of how it is registered in the database.\nHowever, some types cannot be determined from the database alone. URL fields and\ne-mail fields, for instance, are stored as text, so they will be treated as text\nby default. It is possible to tell HyperAdmin what type of field you're\nspecifying by using the `type` keyword:\n\n```ruby\nHyperAdmin.register Article do\n  index do\n    column :id\n    column :title\n    column :published_at\n    column :author_email, type: :email\n  end\nend\n```\n\nThe “email” type will create a “mailto”-style link in the index and show\nviews, and an `\u003cinput type=\"email\"\u003e` in the form. Likewise, the “url” type will\ncreate a regular link in index/show and an `\u003cinput type=\"url\"\u003e` in forms.\n\nLastly, it is also possible to customize the labeling of the attributes in each\nview using the `human` keyword:\n\n```ruby\nHyperAdmin.register Article do\n  index do\n    column :id\n    column :title\n    column :published_at, human: \"Publication date\"\n    column :author_email, type: :email\n  end\nend\n```\n\nNote that if `human` is not specified, HyperAdmin will fetch the attribute name\nfrom the currently active locale, which is recommended most of the time. `human`\nis available for special cases where you want a label other than the localized\nname of the attribute.\n\nCustomizing the show and form pages work the same way as the index pages, but\nusing the `row` and `field` methods instead, respectively. A fully customized\nresource registration might look something like this:\n\n```ruby\nHyperAdmin.register Article do\n  index do\n    column :id\n    column :title\n    column :published_at, human: \"Publication date\"\n  end\n\n  show do\n    row :id, human: \"Article ID\"\n    row :title\n    row :body\n    row :published_at, human: \"Publication date\"\n\n    column :author_email, type: :email\n  end\n\n  form do\n    field :title\n    field :body\n    field :published_at\n    field :author_email, type: :email\n  end\nend\n```\n\n## Contributing\n\n1. Fork it\n2. Check out the develop branch (`git checkout develop`)\n3. Create your feature branch (`git checkout -b feature/my-new-feature`)\n4. Commit your changes (`git commit -am 'Add my new feature'`)\n5. Push to the branch (`git push origin my-new-feature`)\n6. Create a new Pull Request\n\n## Credits\n\nHyper made this. We're a digital communications agency with a passion for good\ncode, and if you're using HyperAdmin we probably want to hire you.\n\n## License\n\nHyperAdmin is available under the MIT license. See LICENSE.md for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperoslo%2Fhyper_admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperoslo%2Fhyper_admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperoslo%2Fhyper_admin/lists"}