inline documentation

This commit is contained in:
Devin Howard 2016-10-25 13:14:15 +08:00
parent 01e6480920
commit 053da92dde

View file

@ -23,6 +23,9 @@ class SynapsesController < ApplicationController
@synapse.desc = '' if @synapse.desc.nil?
@synapse.desc.strip! # no trailing/leading whitespace
# we want invalid params to return :unprocessable_entity
# so we have to authorize AFTER saving. But if authorize
# fails, we need to rollback the SQL transaction
success = nil
ActiveRecord::Base.transaction do
success = @synapse.save