Class: Releaf::RootController
- Inherits:
-
ActionController
- Object
- ActionController::Base
- ActionController
- Releaf::RootController
- Defined in:
- app/controllers/releaf/root_controller.rb
Instance Method Summary collapse
- #home ⇒ Object
-
#store_settings ⇒ Object
Store settings for menu collapsing and others.
Methods inherited from ActionController
#access_denied, #collection_given?, #confirm_destroy, #controller_scope_name, #create, #create_another?, #definition, #destroy, #destroyable?, #edit, #index, #new, #page_title, #prepare_create, #prepare_destroy, #prepare_edit, #prepare_index, #prepare_new, #prepare_resource_view, #prepare_show, #prepare_toolbox, #prepare_update, #required_params, #short_name, #show, #toolbox, #update
Methods included from Responders
#action_responder, #action_responders, #active_responder, #respond_with
Methods included from ActionController::Views
#action_view, #action_views, #active_view
Methods included from ActionController::RichtextAttachments
#create_releaf_richtext_attachment, #releaf_richtext_attachment_upload_url
Methods included from ActionController::Breadcrumbs
#add_resource_breadcrumb, #build_breadcrumbs, #controller_breadcrumb
Methods included from ActionController::Urls
#current_path, #index_path, #resolve_index_path, #success_path, #valid_index_path?
Methods included from ActionController::Ajax
Methods included from ActionController::Features
#action_feature, #action_features, #feature_available?, #feature_disabled, #features, #verify_feature_availability!
Methods included from ActionController::Search
#search, #searchable_fields, #searcher_class
Methods included from ActionController::Builders
#application_scope, #builder_class, #builder_scopes
Methods included from ActionController::Resources
#load_resource, #new_resource, #permitted_params, #resource_class, #resource_given?, #resource_params, #resources, #resources_per_page
Methods included from ActionController::Notifications
#notice_scope_name, #render_notification
Instance Method Details
#home ⇒ Object
2 3 4 5 6 7 8 |
# File 'app/controllers/releaf/root_controller.rb', line 2 def home respond_to do |format| format.html do redirect_to Releaf.application.config.root.default_controller_resolver.call(current_controller: self) end end end |
#store_settings ⇒ Object
Store settings for menu collapsing and others
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/releaf/root_controller.rb', line 11 def store_settings if params[:settings].is_a? Hash params[:settings].each_pair do|key, value| value = false if value == "false" value = true if value == "true" Releaf.application.config.settings_manager.write(controller: self, key: key, value: value) end render nothing: true, status: 200 else render nothing: true, status: 422 end end |