Lotus Admin
Provides a simple, Bootstrap 3 Material Design UI to administer your web app.
Usage
Install and subclass any controllers, models, or views as needed.
Installation
Add this line to your application's Gemfile and then mount the engine in your application.
Requirements
- Ruby 2.4
- Rails 5
Required Secrets
You will need to define these secrets.
action_mailer_default_sender_address
Setup
Manually configure ranack to use simple form, before rails boots.
# config/application.rb
require_relative 'boot'
ENV['RANSACK_FORM_BUILDER'] = '::SimpleForm::FormBuilder'
require 'rails/all'
# Gemfile
gem 'lotus_admin', '~> 0.1.0'
And then execute:
$ bundle
Add to your routes
# config/routes.rb
mount LotusAdmin::Engine, at: 'admin'
Seed an administrator account, optional.
$> rake lotus_admin:seed
You can now login at http://localhost:3000/admin.
Theme Customization
There are many partials and SCSS variables that can be overwritten to customize the theme without writing a lot of custom markup.
To get started, provide any SCSS variables in a file at app/assets/stylesheets/lotus_admin/_variables.scss
.
Configuration
You may configure the engine by providing an intializer:
# conifg/initializers/lotus_admin.rb
LotusAdmin.configure do |config|
# perhaps add more custom resources
config.routes do
resources :cats, only: :show
resources :dogs
end
end
Contributing
Contribution directions go here.
Testing
$> bundle exec rspec spec
You can run the included test rails app as well:
$> cd spec/dummy && rails s
License
The gem is available as open source under the terms of the MIT License.