Class: ProjectOptionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ProjectOptionsController
- Defined in:
- app/controllers/project_options_controller.rb
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
Methods inherited from ApplicationController
#after_sign_in_path_for, #api_authenticate!, #authenticated_via_token?, #current_project, #expire_revision!, #followed_projects, #no_cache, #oauth_authorize!, #read_revision, #require_login, #return_or_cache_revision!, #revision, #token_authenticate!, #unfurling?, #with_current_project
Methods included from UrlHelper
#feature_path, #link_to_project_feature
Instance Attribute Details
#project ⇒ Object (readonly)
Returns the value of attribute project.
3 4 5 |
# File 'app/controllers/project_options_controller.rb', line 3 def project @project end |
Instance Method Details
#destroy ⇒ Object
13 14 15 16 17 |
# File 'app/controllers/project_options_controller.rb', line 13 def destroy project.props.delete! params[:key] project.save! head :ok end |
#update ⇒ Object
6 7 8 9 10 |
# File 'app/controllers/project_options_controller.rb', line 6 def update project.props.merge! params[:options].to_unsafe_hash # <-- TODO: should props be declared and then permitted? project.save! head :ok end |