Class: Api::V1::EmployersController
- Inherits:
-
ApiController
- Object
- ApiController
- Api::V1::EmployersController
- Defined in:
- app/controllers/acts_as_talented/api/v1/employers_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
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 |
#update ⇒ Object
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..join(",") } end end |