Module: ActiveScaffold::Actions::Nested

Defined in:
lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/nested.rb,
lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/nested.rb

Overview

The Nested module basically handles automatically linking controllers together. It does this by creating column links with the right parameters, and by providing any supporting systems (like a /:controller/nested action for returning associated scaffolds).

Defined Under Namespace

Modules: ChildMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/nested.rb', line 5

def self.included(base)
  super
  base.module_eval do
    include ActiveScaffold::Actions::Nested::ChildMethods if active_scaffold_config.model.reflect_on_all_associations.any? {|a| a.macro == :has_and_belongs_to_many}
  end
  base.before_filter :include_habtm_actions
  base.helper_method :nested_habtm?
end

Instance Method Details

#nestedObject



14
15
16
17
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/nested.rb', line 14

def nested
  do_nested
  respond_to_action(:nested)
end