Class: Admin::FormsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/admin/forms_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



24
25
26
27
28
29
30
31
32
# File 'app/controllers/admin/forms_controller.rb', line 24

def create
  if @form.save
    flash[:notice] = I18n.t('form.create.success')
    redirect_to([forgeos_commerce, :edit, :admin, @form])
  else
    flash[:error] = I18n.t('form.create.failed')
    render :action => :new
  end
end

#editObject



18
19
# File 'app/controllers/admin/forms_controller.rb', line 18

def edit
end

#indexObject



5
6
7
8
9
10
11
12
13
# File 'app/controllers/admin/forms_controller.rb', line 5

def index
  respond_to do |format|
    format.html
    format.json do
      sort
      render :layout => false
    end
  end
end

#newObject



21
22
# File 'app/controllers/admin/forms_controller.rb', line 21

def new
end

#showObject



15
16
# File 'app/controllers/admin/forms_controller.rb', line 15

def show
end