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

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



124
125
126
127
128
129
# File 'lib/active_scaffold/actions/nested.rb', line 124

def self.included(base)
  super
  base.verify :method => :post,
              :only => :add_existing,
              :redirect_to => { :action => :index }
end

Instance Method Details

#add_existingObject



136
137
138
139
# File 'lib/active_scaffold/actions/nested.rb', line 136

def add_existing
  do_add_existing
  respond_to_action(:add_existing)
end

#destroy_existingObject



141
142
143
144
145
# File 'lib/active_scaffold/actions/nested.rb', line 141

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

#new_existingObject



131
132
133
134
# File 'lib/active_scaffold/actions/nested.rb', line 131

def new_existing
  do_new
  respond_to_action(:new_existing)
end