Module: AbAdmin

Extended by:
Utils
Defined in:
lib/ab_admin.rb,
lib/ab_admin/utils.rb,
lib/ab_admin/devise.rb,
lib/ab_admin/engine.rb,
lib/ab_admin/version.rb,
lib/ab_admin/menu/item.rb,
lib/ab_admin/menu/group.rb,
lib/ab_admin/config/base.rb,
lib/ab_admin/models/user.rb,
lib/ab_admin/utils/mysql.rb,
lib/ab_admin/menu/builder.rb,
lib/ab_admin/models/asset.rb,
lib/ab_admin/models/track.rb,
lib/ab_admin/utils/logger.rb,
lib/ab_admin/models/header.rb,
lib/ab_admin/views/helpers.rb,
lib/ab_admin/controllers/fv.rb,
lib/ab_admin/models/locator.rb,
lib/ab_admin/mailers/helpers.rb,
lib/ab_admin/menu/base_group.rb,
lib/ab_admin/models/settings.rb,
lib/ab_admin/carrierwave/glue.rb,
lib/ab_admin/controllers/tree.rb,
lib/ab_admin/models/structure.rb,
lib/ab_admin/abstract_resource.rb,
lib/ab_admin/concerns/silencer.rb,
lib/ab_admin/models/type_model.rb,
lib/ab_admin/concerns/utilities.rb,
lib/ab_admin/utils/csv_document.rb,
lib/ab_admin/utils/eval_helpers.rb,
lib/ab_admin/utils/xls_document.rb,
lib/ab_admin/views/form_builder.rb,
lib/ab_admin/concerns/headerable.rb,
lib/ab_admin/concerns/nested_set.rb,
lib/ab_admin/concerns/reloadable.rb,
lib/ab_admin/views/admin_helpers.rb,
lib/ab_admin/concerns/fileuploads.rb,
lib/ab_admin/concerns/validations.rb,
lib/ab_admin/models/admin_comment.rb,
lib/ab_admin/views/url_for_routes.rb,
lib/ab_admin/concerns/has_tracking.rb,
lib/ab_admin/controllers/callbacks.rb,
lib/ab_admin/menu/abstract_builder.rb,
lib/ab_admin/views/manager_helpers.rb,
lib/ab_admin/models/attachment_file.rb,
lib/ab_admin/concerns/admin_addition.rb,
lib/ab_admin/concerns/deep_cloneable.rb,
lib/ab_admin/config/optional_display.rb,
lib/ab_admin/controllers/head_options.rb,
lib/ab_admin/i18n_tools/translate_app.rb,
lib/ab_admin/views/inputs/color_input.rb,
lib/ab_admin/views/inputs/token_input.rb,
lib/ab_admin/carrierwave/base_uploader.rb,
lib/ab_admin/views/inputs/editor_input.rb,
lib/ab_admin/views/search_form_builder.rb,
lib/ab_admin/concerns/asset_human_names.rb,
lib/ab_admin/mailers/mail_attach_helper.rb,
lib/ab_admin/views/content_only_wrapper.rb,
lib/ab_admin/i18n_tools/google_translate.rb,
lib/ab_admin/i18n_tools/model_translator.rb,
lib/ab_admin/views/inputs/ckeditor_input.rb,
lib/ab_admin/views/inputs/uploader_input.rb,
lib/ab_admin/views/admin_navigation_helpers.rb,
lib/generators/ab_admin/glob/glob_generator.rb,
lib/ab_admin/carrierwave/file_size_validator.rb,
lib/generators/ab_admin/model/model_generator.rb,
lib/ab_admin/views/inputs/date_time_picker_input.rb,
lib/generators/ab_admin/install/install_generator.rb,
lib/generators/ab_admin/resource/resource_generator.rb,
lib/generators/ab_admin/ckeditor_assets/ckeditor_assets_generator.rb

Defined Under Namespace

Modules: CarrierWave, Concerns, Config, Controllers, Devise, Generators, I18nTools, Mailers, Menu, Models, Utils, Views Classes: AbstractResource, Engine

Constant Summary collapse

DOMAINNAME_REGEXP =
/\A(?:[0-9a-z]\.|[0-9a-z][0-9a-z\-]*[0-9a-z]+\.)+[a-z]{2,6}\z/
EMAIL_REGEXP =
/\A[_A-Za-z0-9\-\+]+(?:\.[_A-Za-z0-9\-\+]+)*@(?:[0-9a-z]\.|[0-9a-z][0-9a-z\-]*[0-9a-z]+\.)+[a-z]{2,6}\z/
VERSION =
'0.7.0'
@@flash_keys =
[:notice, :error]
@@title_splitter =
''
@@site_name =
'AbAdmin'
@@devise_layout =
'admin/devise'
@@image_types =
%w(image/jpeg image/png image/gif image/jpg image/pjpeg image/tiff image/x-png)
@@display_name_methods =
[:title, :name, :full_name, :id]
@@translate_models =
%w(User Asset Structure StaticPage Header AdminComment)
@@assets =
%w(ab_admin/devise.css bootstrap.js ab_admin/loading.gif ab_admin/clear.png)
@@test_settings =
{}
true
@@fileupload_url =
'/admin/assets'
@@uploads_dir =
'uploads'
@@default_per_page =
50
@@view_default_per_page =
Hash.new { AbAdmin.default_per_page }
@@max_per_page =
Float::INFINITY
@@per_page_variants =
[50, 100, 500, 1000]
@@default_permitted_params =
[:fileupload_guid]

Class Method Summary collapse

Methods included from Utils

all_models, bm, display_name, display_name_method_for, friendly_token, full_url, js_date_data, l_path, load_files!, normalize_html, pretty, pretty_data, rss_text, safe_display_name, test_env?, truncate_text, url_helpers, val_to_array, val_to_array_s

Class Method Details

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

Yields:

  • (_self)

Yield Parameters:

  • _self (AbAdmin)

    the object that the method was called on


195
196
197
# File 'lib/ab_admin.rb', line 195

def self.setup
  yield self
end