Module: BootstrapAdmin

Defined in:
lib/bootstrap_admin.rb,
lib/bootstrap_admin/actions.rb,
lib/bootstrap_admin/version.rb,
lib/bootstrap_admin/attribute.rb,
lib/bootstrap_admin/responder.rb,
lib/bootstrap_admin/controller_config.rb,
lib/bootstrap_admin/controller_helpers.rb,
lib/generators/bootstrap_admin/install/install_generator.rb,
lib/generators/bootstrap_admin/override_views/override_views_generator.rb

Overview

Bootstrap admin eases the tedious task of building admin interfaces

Defined Under Namespace

Modules: Actions, ControllerHelpers, Generators, MenuHelper, PaginatorHelper Classes: Attribute, BootstrapAdminEngine, ControllerConfig, Responder

Constant Summary collapse

VERSION =
"1.0.1"
@@admin_namespace =
:admin
@@admin_root_options =
{:only => :show}
@@paginator_page_size =
10
@@ui_styles =
{
  index: %w(table-bordered table-striped)
}
@@default_ignored_fields =
%i(id created_at updated_at)

Class Method Summary collapse

Class Method Details

.default_ignored_field_symbolsObject



63
64
65
# File 'lib/bootstrap_admin.rb', line 63

def self.default_ignored_field_symbols
  @@default_ignored_fields.map(&:to_sym)
end

.filter_ignored_fields(fields) ⇒ Object



67
68
69
# File 'lib/bootstrap_admin.rb', line 67

def self.filter_ignored_fields fields
  Array(fields).map(&:to_sym) - default_ignored_field_symbols
end

.root_dirObject

Returns the gem root dir



29
30
31
# File 'lib/bootstrap_admin.rb', line 29

def self.root_dir
  File.expand_path("../..", __FILE__)
end

.setup {|_self| ... } ⇒ Object

Setup BootstrapAdmin Run rails generate bootstrap_admin:install to create a fresh initializer with all configuration values.

Yields:

  • (_self)

Yield Parameters:



75
76
77
# File 'lib/bootstrap_admin.rb', line 75

def self.setup
  yield self
end