Module: ActiveScaffold

Defined in:
lib/active_scaffold/active_record_permissions.rb,
lib/active_scaffold.rb,
lib/active_scaffold/core.rb,
lib/active_scaffold/engine.rb,
lib/active_scaffold/finder.rb,
lib/active_scaffold/bridges.rb,
lib/active_scaffold/version.rb,
lib/active_scaffold/registry.rb,
lib/active_scaffold/orm_checks.rb,
lib/active_scaffold/constraints.rb,
lib/active_scaffold/configurable.rb,
lib/active_scaffold/marked_model.rb,
lib/active_scaffold/attribute_params.rb,
lib/active_scaffold/helpers/id_helpers.rb,
lib/active_scaffold/responds_to_parent.rb,
lib/active_scaffold/helpers/view_helpers.rb,
lib/active_scaffold/bridges/bitfields/list_ui.rb,
lib/active_scaffold/bridges/dragonfly/form_ui.rb,
lib/active_scaffold/bridges/dragonfly/list_ui.rb,
lib/active_scaffold/bridges/paperclip/form_ui.rb,
lib/active_scaffold/bridges/paperclip/list_ui.rb,
lib/active_scaffold/extensions/routing_mapper.rb,
lib/active_scaffold/helpers/controller_helpers.rb,
lib/active_scaffold/helpers/pagination_helpers.rb,
lib/active_scaffold/bridges/carrierwave/form_ui.rb,
lib/active_scaffold/bridges/carrierwave/list_ui.rb,
lib/active_scaffold/bridges/file_column/form_ui.rb,
lib/active_scaffold/bridges/file_column/list_ui.rb,
lib/active_scaffold/helpers/action_link_helpers.rb,
lib/active_scaffold/helpers/association_helpers.rb,
lib/active_scaffold/helpers/form_column_helpers.rb,
lib/active_scaffold/helpers/list_column_helpers.rb,
lib/active_scaffold/helpers/show_column_helpers.rb,
lib/generators/active_scaffold/install_generator.rb,
lib/active_scaffold/extensions/connection_adapter.rb,
lib/active_scaffold/helpers/search_column_helpers.rb,
lib/generators/active_scaffold/resource_generator.rb,
lib/active_scaffold/bridges/active_storage/form_ui.rb,
lib/active_scaffold/bridges/active_storage/list_ui.rb,
lib/active_scaffold/extensions/paginator_extensions.rb,
lib/active_scaffold/helpers/human_condition_helpers.rb,
lib/generators/active_scaffold/controller_generator.rb,
lib/active_scaffold/extensions/action_view_rendering.rb,
lib/active_scaffold/extensions/action_view_rendering.rb,
lib/active_scaffold/bridges/bitfields/bitfields_bridge.rb,
lib/active_scaffold/bridges/dragonfly/dragonfly_bridge.rb,
lib/active_scaffold/bridges/paperclip/paperclip_bridge.rb,
lib/active_scaffold/extensions/name_option_for_datetime.rb,
lib/active_scaffold/bridges/carrierwave/carrierwave_bridge.rb,
lib/active_scaffold/bridges/paper_trail/paper_trail_bridge.rb,
lib/active_scaffold/extensions/action_controller_rendering.rb,
lib/active_scaffold/bridges/file_column/file_column_helpers.rb,
lib/active_scaffold/bridges/calendar_date_select/as_cds_bridge.rb,
lib/active_scaffold/bridges/dragonfly/dragonfly_bridge_helpers.rb,
lib/active_scaffold/bridges/paperclip/paperclip_bridge_helpers.rb,
lib/active_scaffold/bridges/active_storage/active_storage_bridge.rb,
lib/active_scaffold/bridges/active_storage/active_storage_helpers.rb,
lib/active_scaffold/bridges/carrierwave/carrierwave_bridge_helpers.rb

Overview

wrap the action rendering for ActiveScaffold controllers

Defined Under Namespace

Modules: ActionController, Actions, ActiveRecordPermissions, AttributeParams, Bridges, Config, Configurable, ConnectionAdapters, Constraints, Core, DataStructures, DateSelectExtension, Finder, Generators, Helpers, LookupContext, MarkedModel, OrmChecks, Page, Paginator, RenderingHelper, RespondsToParent, Routing, UnsavedRecord, Version Classes: ActionNotAllowed, ControllerNotFound, Engine, MalformedConstraint, RecordNotAllowed, Registry, ReverseAssociationRequired, Tableless

Class Method Summary collapse

Class Method Details

.autoload_subdir(dir, mod = self, root = File.dirname(__FILE__)) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/active_scaffold.rb', line 18

def self.autoload_subdir(dir, mod = self, root = File.dirname(__FILE__))
  Dir["#{root}/active_scaffold/#{dir}/*.rb"].each do |file|
    basename = File.basename(file, '.rb')
    mod.module_eval do
      autoload basename.camelcase.to_sym, "active_scaffold/#{dir}/#{basename}"
    end
  end
end

.defaults(&block) ⇒ Object



95
96
97
# File 'lib/active_scaffold.rb', line 95

def self.defaults(&block)
  ActiveScaffold::Config::Core.configure(&block)
end

.exclude_bridgesObject



85
86
87
# File 'lib/active_scaffold.rb', line 85

def self.exclude_bridges
  @@exclude_bridges ||= []
end

.jquery_ui_included?Boolean

Returns:

  • (Boolean)


70
71
72
73
# File 'lib/active_scaffold.rb', line 70

def self.jquery_ui_included?
  return true if @@jquery_ui_loaded
  Jquery::Rails.const_defined?('JQUERY_UI_VERSION') || Jquery.const_defined?('Ui') if Object.const_defined?('Jquery')
end

.js_configObject



76
77
78
# File 'lib/active_scaffold.rb', line 76

def self.js_config
  @@js_config ||= {:scroll_on_close => :checkInViewport}
end

.js_frameworkObject



60
61
62
63
64
65
66
67
# File 'lib/active_scaffold.rb', line 60

def self.js_framework
  @@js_framework ||=
    if defined? Jquery
      :jquery
    elsif defined? PrototypeRails
      :prototype
    end
end

.rootObject



91
92
93
# File 'lib/active_scaffold.rb', line 91

def self.root
  File.dirname(__FILE__) + '/..'
end

.threadsafe!Object



55
56
57
# File 'lib/active_scaffold.rb', line 55

def self.threadsafe!
  @@threadsafe = true
end