Class: ForemanX509::Api::V2::GenerationsController
- Inherits:
-
BaseController
- Object
- Api::V2::BaseController
- BaseController
- ForemanX509::Api::V2::GenerationsController
- Defined in:
- app/controllers/foreman_x509/api/v2/generations_controller.rb
Instance Method Summary collapse
- #activate ⇒ Object
- #certificate ⇒ Object
- #destroy ⇒ Object
- #index ⇒ Object
- #key ⇒ Object
- #show ⇒ Object
Instance Method Details
#activate ⇒ Object
37 38 39 |
# File 'app/controllers/foreman_x509/api/v2/generations_controller.rb', line 37 def activate @generation.activate! end |
#certificate ⇒ Object
24 25 |
# File 'app/controllers/foreman_x509/api/v2/generations_controller.rb', line 24 def certificate end |
#destroy ⇒ Object
42 43 44 |
# File 'app/controllers/foreman_x509/api/v2/generations_controller.rb', line 42 def destroy @generation.destroy end |
#index ⇒ Object
11 12 13 |
# File 'app/controllers/foreman_x509/api/v2/generations_controller.rb', line 11 def index @generations = resource_scope_for_index end |
#key ⇒ Object
30 31 32 |
# File 'app/controllers/foreman_x509/api/v2/generations_controller.rb', line 30 def key send_data @generation.key.to_pem, filename: "#{@generation.owner.name}-#{@generation.id}_key.pem" end |
#show ⇒ Object
18 19 |
# File 'app/controllers/foreman_x509/api/v2/generations_controller.rb', line 18 def show end |