Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rails_modular_admin

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rails_modular_admin

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

RailsModularAdmin

This plugin is designed to quickly generate views for Rails applications in need of dashboard functionality. This includes admin panels and SaaS applications. I found that over the course of my projects, I needed Dashboard pages very often, so by creating this gem, I'm at least saving my self a bunch of time.

Usage

Easiest way is to run the install task:

$ rails g rails_modular_admin:install

Installation

Add this line to your application's Gemfile:

gem 'rails_modular_admin'

And then execute:

$ bundle

Now install through the included generator:

rails g rails_modular_admin:install

The install generator copies over the custom theme.scss file, which you can use to include your own color scheme. Now, add the following lines to your application.scss:

@import "custom-theme";
@import "rails_modular_admin";

Add bootstrap, popper, and jquery to application.js and import bootstrap Change the variables in custom-theme.scss to change the colors in your application. Finally, add this line to your application.html.erb at the bottom (after the tag and before the tag). Do not add the rails_modular_admin javascripts to your application.js, because it needs to be loaded after the rest of the page for the reference block.

<%= javascript_include_tag 'rails_modular_admin' %>

Installing the Views

Rails Modular Admin includes a generator to install the commonly needed views for an administration application. To copy over the templates, run:

rails g rails_modular_admin:<user_model>:views

where <user_model> is the name of the model for which you want to install the authentication views, which is typicall just User.

Development Environment

  1. Prior to packaging as a gem, make sure that yarn install has been run and that it is bundled with the gem. Otherwise, there wil be file not found errors.

Contributing

Write a pull request and I'll get to it as soon as I can.

License

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

TODO

[*] Update install task to automatically adjust package.json and run yarn install. -> Ended up being able to do this by just bundling node_modules with the gem. [] Theme choices. [] Generators to install common views, namely the dashboard and login pages (devise). [] Helper methods for commonly used assets or features. [] Test suite because it's currently non-existent. [] Tests for each JavaScript dependency presence. [] Fix implementation when user has custom javascripts that depend on Bootstrap, thus loading it twice.

FAQs

Package last updated on 31 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc