All Projects → artofhuman → Activeadmin_settings_cached

artofhuman / Activeadmin_settings_cached

Licence: mit
UI interface for rails-settings-cached in active admin

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Activeadmin settings cached

Formadmin
Modern and responsive theme for Active Admin used by Formaweb.
Stars: ✭ 79 (+54.9%)
Mutual labels:  activeadmin, rails
Demo.activeadmin.info
A store application to use in tutorials for Active Admin
Stars: ✭ 253 (+396.08%)
Mutual labels:  activeadmin, rails
Activeadmin
The administration framework for Ruby on Rails applications.
Stars: ✭ 9,096 (+17735.29%)
Mutual labels:  activeadmin, rails
Activeadmin Themes
Awesome themes for ActiveAdmin.
Stars: ✭ 141 (+176.47%)
Mutual labels:  activeadmin, rails
Rails Settings
Manage settings with Ruby on Rails
Stars: ✭ 807 (+1482.35%)
Mutual labels:  settings, rails
Activeadmin quill editor
Quill Rich Text Editor for ActiveAdmin
Stars: ✭ 76 (+49.02%)
Mutual labels:  activeadmin, rails
Arctic admin
Responsive Theme for ActiveAdmin
Stars: ✭ 201 (+294.12%)
Mutual labels:  activeadmin, rails
Activeadmin dynamic fields
ActiveAdmin plugin to add dynamic behaviors to fields
Stars: ✭ 73 (+43.14%)
Mutual labels:  activeadmin, rails
Arbre
An Object Oriented DOM Tree in Ruby
Stars: ✭ 610 (+1096.08%)
Mutual labels:  activeadmin, rails
Activeadmin addons
Extends ActiveAdmin to enable a set of great optional UX improving add-ons
Stars: ✭ 574 (+1025.49%)
Mutual labels:  activeadmin, rails
Sail
Sail is a lightweight Rails engine that brings an admin panel for managing configuration settings on a live Rails app
Stars: ✭ 484 (+849.02%)
Mutual labels:  settings, rails
Activeadmin froala editor
Froala WYSIWYG editor for ActiveAdmin
Stars: ✭ 30 (-41.18%)
Mutual labels:  activeadmin, rails
Activeadmin trumbowyg
Trumbowyg Editor for ActiveAdmin
Stars: ✭ 29 (-43.14%)
Mutual labels:  activeadmin, rails
Activeadmin blaze theme
ActiveAdmin theme based on Blaze CSS toolkit
Stars: ✭ 35 (-31.37%)
Mutual labels:  activeadmin, rails
App
Fast and searchable Ruby docs
Stars: ✭ 47 (-7.84%)
Mutual labels:  rails
Execjs Fastnode
⚡️ A faster Node.JS integration for Ruby/Rails ExecJS
Stars: ✭ 49 (-3.92%)
Mutual labels:  rails
Graphql Rails Generators
Graphql Rails Scaffold™. Automatically generate GraphQL types from your rails models.
Stars: ✭ 47 (-7.84%)
Mutual labels:  rails
Furatto Rails Start Kit
A rails app with Furatto, Devise, and Facebook Authentication perfect for hackathons!
Stars: ✭ 46 (-9.8%)
Mutual labels:  rails
Action mailer matchers
ActionMailerMatchers provides rspec matchers to test Rails' common ActionMailer functionality.
Stars: ✭ 50 (-1.96%)
Mutual labels:  rails
Rackula
Generate a static site from any rack middleware.
Stars: ✭ 49 (-3.92%)
Mutual labels:  rails

Activeadmin Settings Cached

Gem Version Build Status Coverage Status

Provides a nice UI interface for rails-settings-cached gem in Active Admin.

Installation

Add this line to your application's Gemfile:

gem 'activeadmin_settings_cached'

And then execute:

$ bundle

Create your settings model:

$ rails g settings:install
$ bundle exec rake db:migrate

Create your settings page:

# From generators                   
$ rails g active_admin:settings Setting  
             
# Or manual
# app/admin/setting.rb
ActiveAdmin.register_page 'Setting' do
  title = 'Settings'
  menu label: title

  active_admin_settings_page(
    title: title
  )
end

And configure your default values in your Settings model:

class Settings < RailsSettings::CachedSettings
  defaults[:my_awesome_settings] = 'This is my settings'
end

In your application's admin interface, there will now be a new page with this setting

active_admin_settings_page DSL

Basic usage

ActiveAdmin.register_page 'Settings' do
  menu label: 'Settings', priority: 99
  active_admin_settings_page options
end

Options

Tool Description
:model_name String, settings model name override (default: uses name from global config.)
:starting_with String, each key must starting with, (default: nil)
:key String, Symbol root key, can be replacement for starting_with, (default: nil)
:template String, custom template rendering (default: 'admin/settings/index')
:template_object object passing to view (default: ActiveadminSettingsCached::Model instance)
:display Hash, display settings override (default: {})
:title String, title value override (default: I18n.t('settings.menu.label'))
:after_save Proc, callback for action after POST request, (default: nil)

Localization

You can localize settings keys in local file

en:
  settings:
    attributes:
      my_awesome_settings: 'My Awesome Localized Setting'

Model name

By default the name of the mode is Setting. If you want to use a different name for the model, you can specify your that in config/initializers/active_admin_settings_cached.rb:

ActiveadminSettingsCached.configure do |config|
  config.model_name = 'AdvancedSetting'
end

Display options

If you need define display options for settings fields, eg textarea, url or :timestamp and etc., you can set display option in initializer.

ActiveadminSettingsCached.configure do |config|
  config.display = {
    my_awesome_setting_name: :text,
    my_awesome_setting_name_2: :timestamp,
    my_awesome_setting_name_3: :select
  }
end

Available options see here

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

How run local example

make bash
make setup
cd spec/rails/rails-5.1.7/
BUNDLE_GEMFILE=/app/gemfiles/rails5.1.gemfile bundle exec rails s -b 0.0.0.0
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].