Class: Api::V1::EmployersController

Inherits:
ApiController
  • Object
show all
Defined in:
app/controllers/acts_as_talented/api/v1/employers_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



9
10
11
# File 'app/controllers/acts_as_talented/api/v1/employers_controller.rb', line 9

def index
  respond_with Employer.all.to_json
end

#updateObject



13
14
15
16
17
18
19
# File 'app/controllers/acts_as_talented/api/v1/employers_controller.rb', line 13

def update
	if @employer.update_attributes(update_params)
   render json: { status: "success" }
 else
   render json: { status: "failure", error: employer.errors.full_messages.join(",") }
 end
end