Module: ActiveScaffold::Actions::Nested::ChildMethods

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



89
90
91
92
93
94
95
96
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/nested.rb', line 89

def self.included(base)
  super
  # AST - TODO - Are we still having issues here?
  # This .verify method call is clashing with other non .add_existing actions. How do we do this correctly? Can we make it action specific.
  # base.verify :method => :post,
  #             :only => :add_existing,
  #             :redirect_to => { :action => :index }
end

Instance Method Details

#add_existingObject



103
104
105
106
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/nested.rb', line 103

def add_existing
  do_add_existing
  respond_to_action(:add_existing)
end

#destroy_existingObject



108
109
110
111
112
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/nested.rb', line 108

def destroy_existing
  return redirect_to(params.merge(:action => :delete)) if request.get?
  do_destroy_existing
  respond_to_action(:destroy_existing)
end

#new_existingObject



98
99
100
101
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/actions/nested.rb', line 98

def new_existing
  do_new
  respond_to_action(:new_existing)
end