Method: ActiveScaffold::Actions::Nested.included

Defined in:
lib/active_scaffold/actions/nested.rb

.included(base) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/active_scaffold/actions/nested.rb', line 6

def self.included(base)
  super
  base.module_eval do
    before_action :set_nested
    before_action :configure_nested
    include ActiveScaffold::Actions::Nested::ChildMethods if active_scaffold_config.columns.filter_map(&:association).any?(&:habtm?)
  end
  base.helper_method :nested
  base.helper_method :nested_parent_record
end