administrate

A Rails engine that helps you put together a super-flexible admin dashboard.

Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star half bd79095782ee4930099175e5ce7f4c89fa3ddabcd56fffcc7c74f6f2a2d46b27 (1 ratings)
Rated 4.5 out of 5
Subscribe to updates I use administrate


Statistics on administrate

Number of watchers on Github 3785
Number of open issues 172
Average time to close an issue 14 days
Main language Ruby
Average time to merge a PR 7 days
Open pull requests 171+
Closed pull requests 47+
Last commit 5 months ago
Repo Created over 3 years ago
Repo Last Updated 4 months ago
Size 1.2 MB
Homepage http://administra...
Organization / Authorthoughtbot
Latest Releasev0.9.0
Contributors33
Page Updated
Do you use administrate? Leave a review!
View open issues (172)
View administrate activity
View TODOs for administrate (2)
View on github
Latest Open Source Launches
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating administrate for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)
What people are saying about administrate Leave a review
easily generated

Administrate

CircleCI Gem Version Code Climate

A framework for creating flexible, powerful admin dashboards in Rails. Try the demo.

Warning:

Administrate is still pre-1.0, and there may be occasional breaking changes to the API. Check the release notes for important updates.

administrate

What Is Administrate?

Administrate is a library for Rails apps that automatically generates admin dashboards. Administrate's admin dashboards give non-technical users clean interfaces that allow them to create, edit, search, and delete records for any model in the application.

Administrate solves the same problem as Rails Admin and ActiveAdmin, but aims to provide a better user experience for site admins, and to be easier for developers to customize.

To accomplish these goals, Administrate follows a few guiding principles:

  • No DSLs (domain-specific languages)
  • Support the simplest use cases, and let the user override defaults with standard tools such as plain Rails controllers and views.
  • Break up the library into core components and plugins, so each component stays small and easy to maintain.

Getting Started

Administrate supports Rails from 4.2, up to 5.0 and beyond. We support Ruby 2.2.9 and up.

Add Administrate to your Gemfile and re-bundle:

gem "administrate"

The included installer will create dashboards for each model in your app, complete with routes:

$ rails generate administrate:install

Restart your server, and visit http://localhost:3000/admin to see your new dashboard in action.

For more detailed instructions or to make it work with Rails API-only applications, please go through the 'Getting Started` guide.

Create Additional Dashboards

In order to create additional dashboards, pass in the resource name to the dashboard generator. A dashboard and controller will be created.

$ rails generate administrate:dashboard Foo

Documentation

To customize the appearance, behavior, and contents of the dashboard, see the guides at https://administrate-prototype.herokuapp.com. These guides are available as markdown files in the docs subdirectory of the git repository, too.

Repository Structure

This repository contains both the source code for Administrate, and a demo Rails app that uses Administrate. The demo app is hosted publicly on Heroku.

  • The gem's source code lives in the app and lib subdirectories.
  • The demo app is nested within spec/example_app.
  • The guides as seen at https://administrate-prototype.herokuapp.com live as markdown files in the docs subdirectory.

Rails configuration files have been changed to recognize the app in the new location, so running the server or deploying to Heroku works normally.

With this structure, developing a typical feature looks like:

  • Add tests in spec/
  • Implement a feature in administrate/
  • Exercise the feature using the demo rails app (spec/example_app/app/)

Front-end Architecture

This project uses:

  • Sass
  • BEM-style CSS selectors, with namespaces
  • Autoprefixer
  • SCSS-Lint, with Hound
  • A variety of CSS units:
    • em for typographical-related elements
    • rem for lengths related to components
    • px for borders, text shadows, etc.
    • vw/vh for lengths that should be relational to the viewport

Contributing

Please see CONTRIBUTING.md.

administrate was originally written by Grayson Wright and is now maintained by Nick Charlton. Many improvements and bugfixes were contributed by the open source community.

License

administrate is Copyright 2015-2017 thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About thoughtbot

thoughtbot

administrate is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We love open source software! See our other projects or hire us to design, develop, and grow your product.

administrate open issues Ask a question     (View All Issues)
  • over 1 year Search functionality issues
  • over 1 year Broken sort arrow in the resource table
  • over 1 year Setting extra attributes on has_many join table?
  • over 1 year Unable to display has many relationship if "source" is used in the relationship
  • over 1 year Question: Does this gem allow adding children to parent object?
  • over 1 year Demo app throws errors
  • almost 2 years "datetimepicker" not showing / responding in datetime field.
  • almost 2 years Fresh install of gem, cannot get past Invalid CSS Error
  • almost 2 years with_options usage documentation
  • almost 2 years Generate administrate:views creates incorrect path
  • almost 2 years Install causes Collection attribute type errors
  • almost 2 years Question: default_scoped models
  • almost 2 years ActiveRecord::AssociationTypeMismatch in Admin::CampingsController#update
  • about 2 years question: Can I hide dashboards from the left menu but keep them in as relationships?
  • about 2 years I18N: Attributes labels translation issue
  • about 2 years cast type in search (function lower text does not exist error)
  • about 2 years How do I customize various admin messages?
  • about 2 years How to pass current_user to Administrate::Field ?
  • about 2 years Dependency on bourbon not listed
  • about 2 years rails g install error
  • about 2 years Question: Why aren't field options available to templates?
  • about 2 years NoMethodError on Models with methods overriding their fields
  • about 2 years Is it possible to display an association on a particular dashboard?
  • about 2 years NameError in Admin::UsersController#index
  • about 2 years Updating causes unrelated NULL fields to become NOT NULL
  • about 2 years rails g administrate:install error
  • about 2 years Adding Custom Field Type - ChosenRails
  • about 2 years Viewing User Record: ActionView::Template::Error: undefined method `limit' for nil:NilClass
  • about 2 years Customizing for all resources doesn't work
  • about 2 years Search box not fitting into page layout
administrate open pull requests (View All Pulls)
  • Extract image field into a separate gem
  • Orm adapters
  • Path to custom attribute type partial updated in docs
  • Allow preloading has_many records
  • Inline controller's `permitted_attributes` method
  • Suggest spring disabling in README
  • update custom field generator to new form html structure
  • Doc on how to change resource labels in collections
  • Alternative view buttons while showing a resource
  • Name collission with Pundit.permitted_attributes fixed
  • Add arabic translations
  • Add extension point for custom styles.
  • Added rails generate administrate:dashboard
  • Integration with Globalize
  • Add support for selectable strings on edit pages
  • [WIP] Search Improvements
  • Use ActiveModel::Naming.route_key in sidebar link_to
  • Allow linkable element on row and shouldn't go to show page
  • Applies a margin-bottom to attribute labels
  • Support ordering belongs to fields
  • Ensure that collection rows are proper links
  • Allow customizing search fields with the SEARCH_ATTRIBUTES constant
  • Administrate::Search: ensure that column names are quoted
  • Allow customizing the layout's header
  • Associate fields with original resource
  • Started Rails 5 compatibility
  • Updated copyright notices to 2016 [ci skip]
  • Japanese locales
  • use before_action instead of before_filter
  • translate AR attributes in heading table if present. Use Kaminari's default per_page method
  • Add spacing below form buttons
  • Update .rubocop.yml to support latest version of config options
  • [#516] Fix error cannot run command rails generate administrate:install
  • Wrap unsupported form field notes in proper divs
  • Ignore routes marked `administrate: false`
  • Freeze generated constants
  • Add a link to release notes to the README
  • Add example of how to use a custom field
  • let routes generator indent all routes (#505).
  • mention home of .md guides in README (#503).
  • Update Rails 4.2.5.1 => 4.2.5.2
  • [#484] Fix views generator should pass args to sub-generator
  • Add options to DateTime field
  • Collection scopes
  • Add a test to verify that translated labels work
  • Updating has_many label to titleize as per other fields in form view.
  • Wrap table cell contents instead of CSS truncation
  • Add translations for additional strings
  • bump ruby to 2.2.4
  • remove the fuubar gem
  • bump rspec to 3.4
  • example on how to use custom file types
  • Use field file for images
  • Add a short section about how to report vulnerabilities
  • Fix translations for show.html and index.html
  • Modify has_many field show
  • Loosen normalize-rails required version
  • Update customizing_dashboards.md
  • =content_for :stylesheet
  • Fix LoadError for administrate/field/image
  • Fix #558 : Wrong constant name guess
  • Avoid generating invalid root route when there's no model
  • Make it easier to override variables
  • Feature scope option
  • Add a script for merging in PRs from repo forks
  • Fix `bin/release` script for pushing to rubygems
  • Handle running install generator where no admin resources defined
  • Abstract model classes should be skipped without warning.
  • Allow links to resources to be hidden from the sidebar
  • Change dashboard USAGE to README
  • Dev setup fixes
  • Use correct inflection for has-many counts of 1
  • Rails 5 Compatibility PR
  • Add engine class methods for registering assets
  • Feature/localized dates
  • Allow to limit route actions
  • Updated readme
  • Fix I18n translation for attributes in has_many collections
  • Update administrate.pt-BR.yml
  • Adding Portuguese locale
  • Upgrade `bourbon` to the latest and greatest
  • Update `Gemfile.lock`
  • Add Bourbon as a dependency
  • Javascript: Fix row-click handler
  • Rails 5
  • Cancel click event when it comes from an input
  • Support namespaced models
  • Update doc for customizing admin dashboard layouts
  • Normalize resource params
  • Upgrade Administrate to work with Rails 5
  • Improve model plural on index pages
  • Better use of i18n for field names
  • Allow specifying scope in with_options for a belongs_to field.
  • Use manifest for precompiling assets with Sprockets 4
  • Update Field::BelongsTo to accept limit option
  • Add missing multiplier option for number fields.
  • Update dashboard_generator.rb
  • bug: rails g administrate:install - shouldn't fill in config/route…
  • [Rails 5] Fix search partial
  • permit! params
  • Rails 5
  • Engine requires bourbon, fixes #615
  • Update Field .with_options Documentation
  • Default all labels to human_attribute_name instead of raw attr_name
  • Add support for namespaced models, resolve #179
  • Fix broken sort arrow svg in the resource table
  • Add instructions on how to add dashboards
  • administrate engine requires bourbon. fixes #615
  • Update customizing_dashboards.md
  • Fix inferred path issue w/name-spaced resources
  • Search Bar Display Logic
  • change generator controller::index pager
  • Docker-based development environment
  • I18n improvements
  • Add support for referencing the resource from fields.
  • Fix typo on pt-BR translation for polymorphic
  • Abstract model classes should be skipped without warning.
  • Allow rails 5.1 usage
  • Use Ruby Methods When Views are KO
  • Support for decorating resources
  • Add foreign key option to Fields
  • Show the total when paginating Field::HasMany
  • Add HasOne support as nested form
  • Remove Neat
  • Remove bourbon
  • Allow resource to be accessed from field (alternative implementation)
  • Add translations for additional strings
  • Rails 5.1
  • Handle case where `Field::HasMany` data is nil
  • Namespace Regex Refactor
  • Date and time fields
  • Add support for changing form field labels.
  • Update the Prototype App to Rails 5
  • Added Time Field
  • Fix hiding of search bar when none of searchable columns are used on index page
  • Add support for namespaced models
  • Remove dependency on remote images in tests
  • Merge pull request #1 from thoughtbot/master
  • Use default application timezone for datetime fields (#1069)
  • human_attribute_name instead of raw attr_name
  • number_field for Field::Number
  • Now you can tell administrate what dashboard class to use
  • Use associated_class to render belongs_to links
  • humanize has_many form label
  • Add additional Rubies using Workflows.
  • Move app/views/fields/ to app/views/administrate/fields/
  • Load huge result sets for belongs_to remotely
  • Make overriding index actions possible
  • Custom field search based on field type
  • Search through association fields
  • Add new password field
  • Render JavaScript in application layout head
  • Group multiple errors
  • Find routes config
  • No dashboard generation when NameError #960
  • Show errors when has_many restrict_with_error.
  • Collection filters
  • Sort has_many fields
  • Date and Time fields
  • Fix 'found unpermitted parameter: :orders' dynamically
  • Feature/custom sorting via options
  • Remove NameError rescue in page base
  • Translate resource name in index and new form titles, headers and buttons
  • More flexible searching
  • Custom field search
  • Update Field::Polymorphic doc to include order option
  • Use cross-DB way to cast search queries to strings
  • Use new_resource in new action
  • Implement overridable index actions
  • Exclude routes that start with namespace that are not in the namespace
  • Update Customizing Views docs with sidebar generator
administrate questions on Stackoverflow (View All Questions)
  • Administrate Gem On Heroku
  • Setting the Admin in Administrate Gem Rails
  • Programs for creating, design and administrate(GUI) SQLite
  • How can I make new a "system" and administrate them
  • In Microsoft Windows, Can I administrate the Java Runtime Setting by script?
  • How to administrate a sinopia server (private npm registry)?
  • administrate multiple databases Sonata Admin Bundle
  • Web-service-API to administrate Exchange-Accounts
  • web based gui for administrate mysql by super user
  • What is the "standard method" for administrate this Wordpress layout?
  • How to administrate Strategy Pattern behaviors at runtime?
  • Administrate facebook application via graph api
  • Execute a command line on the command prompt needs `administrate privilege` even using "ranas"?
  • Wordpress: How to administrate Background-Image and Content Slide
  • How to span child process with administrative privileges from parent process with administrate privileges in C#?
  • How to get the app account access token needed to administrate app album?
  • Unable to Administrate Facebook Comments Plugin
  • Administrate a SQL Server 2000 database from Windows and Change a whole column
  • Subversion: good practices to administrate users and groups with the repositories
  • Any foundation to administrate an Android open source application?
  • Can SQL Server Express be used to effectively administrate a SQL Server Standard/Enterprise installation?
  • Software to Administrate Network Connections
administrate list of languages used
administrate latest release notes
v0.9.0 0.9.0
  • [COMPAT] [#1098] Update all the dependent gems.
  • [COMPAT] [#1099] Update shoulda-matchers from 2.8.0 to 3.1.2.
  • [DOC] [#1081] Update Field::Polymorphic doc to include order option.
  • [COMPAT] [#1095] Upgrade nokogiri to 1.8.2.
  • [i18n] [#1094] Translate form error keys in French.
  • [COMPAT] [#1079] Cast all search queries to text.
  • [COMPAT] [#1077] Switch out squiggly-heredoc for Ruby 2.2 support.
  • [COMPAT] [#1077] Add Ruby 2.2.9 to Circle and clarify support.
  • [BUGFIX] [#1076] [#1078] Fix issues with flaky tests due to ordering
  • [COMPAT] [#1075] Upgrade Circle CI Postgres to 10.1.
  • [COMPAT] [#1032] Add additional Rubies to CI using Workflows.
  • [COMPAT] [#1074] Upgrade to Ruby 2.5.0.
  • [BUGFIX] [#1046] Fix wrong variable name in new_resource key.
  • [i18n] [#1055] Singularize field name in HasMany index partial.
  • [BUGFIX] [#1068] Only define Punditize if Pundit has been loaded.
  • [COMPAT] [#1067] Include pundit in the Gemfiles.
  • [i18n] [#1056] Don't pluralise New [resource] buttons.
  • [i18n] [#1057] Translate form error keys in Catalan.
  • [i18n] [#1054] Add missing keys to Catalan.
  • [DOC] [#1040] Add a note about adding to Dashboards.
  • [BUGFIX] [#1028] Fix of class_name option on has_one fields.
  • [DOC] [#1052] Fix Typo in Changelog.
  • [FEATURE] [#999] Order attributes by association if it exists.
  • [DOC] [#1039] Merge both Field::BelongsTo options_with sections.
  • [i18n] [#1041] Improve German translation of form.errors.
  • [i18n] [#1004] Add form I18n keys to non-default locales.
  • [i18n] [#1004] Add show-/new-/edit- _resource I18n keys non-default locales.
  • [i18n] [#1004] Add and improve I18n for application templates.
  • [FEATURE] [#971] Add authorization features and a Pundit mixin.
  • [DOC] [#1031] Switch to Circle 2.0.
  • [FEATURE] [#1009] Option for Date(Time) objects be in a timezone.
  • [COMPAT] [#1027] Add hardcoded development secret_key_base.
  • [FEATURE] [#1020] Add support for editing polymorphic fields.
  • [FEATURE] [#956] Add namespace option to generators.
  • [DOC] [#1018] Remove suggestion than rerunning install works.
  • [COMPAT] [#1016] FactoryGirl is now FactoryBot.
  • [FEATURE] [#992] Improve field generators.
  • [DOC] [#1008] Adding instructions for getting started with API-only apps.
  • [i18n] [#988] Adds Catalan locales.
  • [FEATURE] [#1000] Add test coverage to ApplicationHelper#sort_order.
  • [UI] [#987] Fix cell sort indicator positioning.
  • [i18n] [#981] Add localization for Bosnian language.
  • [BUGFIX] [#982] Update name of specification example.
  • [DOC] [#980] Update copyright range.
  • [DOC] [#976] Explain that installer requires models.
  • [COMPAT] [#977] Update gems for CVE-2017-9050.
  • [BUGFIX] [#967] Change const_get to constantize to fix undefined method.
  • [DOC] [#972] Fix interpolation highlighting at documentation examples.
  • [FEATURE] [#807] Add foreign key option to Fields.
  • [FEATURE] [#939] Add order option for belongs_to field.
  • [DOC] [#946] Document renaming dashboards.
  • [DOC] [#942] Add IntelliJ-generated files to .gitignore.
  • [DOC] [#940] Add instructions of how to disable some actions.
  • [UI] [#933] Switch to thoughtbot hosted seed images.
  • [FEATURE] [#934] Support for models with uncountable inflections.
v0.8.1 0.8.1
  • [BUGFIX] [#935] Move normalize.css out of vendor.
v0.8.0 0.8.0
  • [FEATURE] [#788] Allow resource to be accessed from field.
  • [OPTIM] [#859] Remove dependency on remote images in tests.
  • [BUGFIX] [#771] Handle case where Field::HasMany data is nil.
  • [FEATURE] [#801] Add HasOne support as nested form.
  • [FEATURE] [#926] Accepts string instead of symbol on order.
  • [DOC] [#928] Fix partial name in view customization docs.
  • [BUGFIX] [#927] Remove rails-controller-testing gem to fix specs with Rails 4.2.
  • [BUGFIX] [#925] Silence ActiveRecord migration output during specs.
  • [CHANGE} [#924] Replace dashboard_class method with a delegate.
  • [BUGFIX] [#594] Fix Label Translation Lookup for has_many Collections.
  • [CHANGE] [#914] Allow custom scope for dashboards.
  • [CHANGE] [#916] Adds _stylesheet to the resources to be generated.
  • [UI] [#554] Make it easier to override Sass variables.
  • [FEATURE] [#910] Allow custom scope for dashboard resource.
  • [FEATURE] [#871] Add support for namespaced models.
  • [I18n] [#904] Improve Korean translation for search input.
  • [UI] [#881] Redesign search.
  • [I18n] [#902] Fixes to Dutch translation.
  • [COMPAT] [#887] Update autoprefixer-rails >= 6.0.
  • [UI] [#896] Make entire search bar clickable.
  • [I18n] [#891] Add translation for search input.
  • [UI] [#886] Fix aria-labelledby on tables.
  • [UI] [#884] Add aria-sort attribute to table headers.
  • [UI] [#882] Update normalize.css and change how we include it.
  • [OPTIM] [#898] Retroactively set migration versions.
  • [FEATURE] [#856] Allow Rails 5.1 usage.
  • [DOC] [#885] Update and test documentation navigation.
  • [UI] [#880] Use SVG symbol for icon system.
  • [CHANGE] [#883] Nested collection links should honour routes.
  • [UI] [#879] Remove unused SVG asset.
  • [DOCS] [#877] Add appraisal and foreman commands to docs.
  • [I18n] [#873] Add support for cyrillic search.
  • [CHANGE] [#857] Abstract model classes should be skipped without warning.
Other projects in Ruby