Class: BusinessDepartmentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/business_departments_controller.rb

Instance Method Summary collapse

Methods included from SessionsHelper

#preferences_customer_type=, #preferences_customer_type?, #signed_in?, #signed_in_user, #store_location

Instance Method Details

#createObject

POST /business_departments POST /business_departments.json



47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'app/controllers/business_departments_controller.rb', line 47

def create
  #@business_department = BusinessDepartment.new(params[:business_department])

  respond_to do |format|
    if @business_department.save
      format.html { redirect_to @business_department, notice: 'Business department was successfully created.' }
      format.json { render json: @business_department, status: :created, location: @business_department }
    else
      format.html { render action: "new" }
      format.json { render json: @business_department.errors, status: :unprocessable_entity }
    end
  end
end