Class: ArchitecturesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ArchitecturesController
- Includes:
- Foreman::Controller::AutoCompleteSearch, Foreman::Controller::Parameters::Architecture
- Defined in:
- app/controllers/architectures_controller.rb
Instance Attribute Summary
Attributes inherited from ApplicationController
Instance Method Summary collapse
Methods included from Foreman::Controller::AutoCompleteSearch
#auto_complete_search, #invalid_search_query, #reset_redirect_to_url, #store_redirect_to_url
Methods inherited from ApplicationController
#api_request?, #current_user, parameter_filter_context, #resource_path, #welcome
Methods included from ApplicationShared
#current_permission, #find_default_taxonomy, #find_session_taxonomy, #scope_by_resource_id, #set_current_taxonomy, #set_current_user, #set_taxonomy, #store_default_taxonomy, #store_taxonomy
Methods included from FindCommon
#controller_permission, #find_resource, #resource_class, #resource_class_for, #resource_finder, #resource_name, #resource_scope, #scope_for
Methods included from Foreman::ThreadSession::Cleaner
Methods included from Foreman::Controller::Timezone
Methods included from Foreman::Controller::TopbarSweeper
#set_topbar_sweeper_controller
Methods included from Foreman::Controller::Session
#backup_session_content, #expire_session, #ignore_api_request?, #session_expiry, #set_activity_time, #update_activity_time
Methods included from Foreman::Controller::Authentication
#authenticate, #authorized, #available_sso, #check_user_enabled, #is_admin?, #path_to_authenticate, #require_login
Methods included from Foreman::Controller::MigrationChecker
Instance Method Details
#create ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'app/controllers/architectures_controller.rb', line 15 def create @architecture = Architecture.new(architecture_params) if @architecture.save process_success else process_error end end |
#destroy ⇒ Object
35 36 37 38 39 40 41 |
# File 'app/controllers/architectures_controller.rb', line 35 def destroy if @architecture.destroy process_success else process_error end end |
#edit ⇒ Object
24 25 |
# File 'app/controllers/architectures_controller.rb', line 24 def edit end |
#index ⇒ Object
7 8 9 |
# File 'app/controllers/architectures_controller.rb', line 7 def index @architectures = resource_base_search_and_page.includes(:operatingsystems) end |
#new ⇒ Object
11 12 13 |
# File 'app/controllers/architectures_controller.rb', line 11 def new @architecture = Architecture.new end |
#update ⇒ Object
27 28 29 30 31 32 33 |
# File 'app/controllers/architectures_controller.rb', line 27 def update if @architecture.update(architecture_params) process_success else process_error end end |