update_context.rb 303 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 module Projects class UpdateContext < BaseContext def execute(role = :default) params[:project].delete(:namespace_id) params[:project].delete(:public) unless can?(current_user, :change_public_mode, project) project.update_attributes(params[:project], as: role) end end end