```ruby
class EmployeesController < ApplicationController
  def index
    @employees = Employee.all
  end

  def new
  end

  def create
    @employee = Employee.new(employee_params)
    if @employee.valid?
      @employee.save

      redirect_to employees_path
    else
      render action: 'new'
    end
  end

  private
  
  def employee_params
    params.require(:employee).permit(:name, :contact, :search, :salary)
  end
end
```

Add show, update & destroy actions
user
```ruby
class EmployeesController < ApplicationController
  def index
    @employees = Employee.all
  end

  def show
    @employee = Employee.find(params[:id])
  end

  def new
  end

  def create
    @employee = Employee.new(employee_params)
    if @employee.valid?
      @employee.save

      redirect_to employees_path
    else
      render action: 'new'
    end
  end

  def edit
    @employee = Employee.find(params[:id])
  end

  def update
    @employee = Employee.find(params[:id])

    if @employee.update(employee_params)
      redirect_to @employee
    else
      render action: 'new'
    end
  end

  def destroy
    @employee = Employee.find(params[:id])
    @employee.destroy

    redirect_to employees_path
  end

  private

  def employee_params
    params.require(:employee).permit(:name, :contact, :search, :salary)
  end
end
```
assistant