/slash_admin

A modern and overridable admin gem, just the rails way.

Primary LanguageHTMLMIT LicenseMIT

Code Climate CircleCI

[W.I.P] SlashAdmin

A modern and overridable admin, just the rails way. Embeded admin user and authentication system, devise is not needed.

Motivation:

  • Provide to rails the admin it deserves without DSL or obscure logic.
  • Provide an easy to use and modern experience to final users.

I tried to take the best from two greats existing gem:

Design inspired from the awesome metronic admin theme:

Screenshots

Image of Login screen Image of List Image of Create / Edit

Installation

Add this line to your application's Gemfile:

gem 'slash_admin'

And then execute:

$ bundle

Or install it yourself as:

$ gem install slash_admin

Gemfile

gem 'carrierwave'

Then:

rails g slash_admin:install
rails slash_admin:install:migrations
rails db:migrate

config/initializers/mime_types.rb

Mime::Type.register "application/xls", :xls
Rails.application.routes.draw do
  mount SlashAdmin::Engine => "/"
end

Mounted as '/' but prefixed in the gem and in routes definition of models admin. See above.

Important

If you are using friendly_id gem, you have to add routes: :default like so:

friendly_id :title, use: :history, routes: :default

Example of create admin in seed.rb in your app:

SlashAdmin::Admin.create!(
  username:               'admin',
  email:                  'contact@mysite.com',
  password:               'admin@admin',
  password_confirmation:  'admin@admin'
)

Documentation

Read the docs

Contributing

Coming soon.

License

The gem is available as open source under the terms of the MIT License.