Module: ActiveScaffold::Actions::Create

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
6
7
8
# File 'lib/active_scaffold/actions/create.rb', line 3

def self.included(base)
  base.before_filter :create_authorized_filter, :only => [:new, :create]
  base.verify :method => :post,
              :only => :create,
              :redirect_to => { :action => :index }
end

Instance Method Details

#createObject



15
16
17
18
# File 'lib/active_scaffold/actions/create.rb', line 15

def create
  do_create
  respond_to_action(:create)
end

#newObject



10
11
12
13
# File 'lib/active_scaffold/actions/create.rb', line 10

def new
  do_new
  respond_to_action(:new)
end