app/controllers/risks_controller.rb
# Used by #edit and #update to set some common instance variables
# from the params
Used by #edit and #update to set some common instance variables
from the params
Used by #edit and #update to set some common instance variables from the params
def update_risk_from_params
    raise ::Unauthorized unless @risk.editable?
    risk_attributes = build_risk_params_for_update
    if risk_attributes.nil?
      redirect_to risk_path(@risk)
      return false
    end
    @risk.init_journal(User.current)
    @risk.safe_attributes = risk_attributes
    true
  end
def update_risk_from_params raise :: Unauthorized unless @risk . editable? risk_attributes = build_risk_params_for_update if risk_attributes . nil? redirect_to risk_path ( @risk ) return false end @risk . init_journal ( User . current ) @risk . safe_attributes = risk_attributes true end
Used by #edit and #update to set some common instance variables
from the params
Used by #edit and #update to set some common instance variables from the params