Class: DefraRubyMocks::CompanyController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- DefraRubyMocks::CompanyController
- Defined in:
- app/controllers/defra_ruby_mocks/company_controller.rb
Instance Method Summary collapse
Instance Method Details
#officers ⇒ Object
19 20 21 |
# File 'app/controllers/defra_ruby_mocks/company_controller.rb', line 19 def officers respond_to :json end |
#show ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/defra_ruby_mocks/company_controller.rb', line 8 def show service = CompaniesHouseService.run(params[:id]) @company_status = service.company_status @company_type = service.company_type respond_to :json rescue NotFoundError render "not_found", status: 404 end |