inline documentation
This commit is contained in:
parent
01e6480920
commit
053da92dde
1 changed files with 3 additions and 0 deletions
|
@ -23,6 +23,9 @@ class SynapsesController < ApplicationController
|
||||||
@synapse.desc = '' if @synapse.desc.nil?
|
@synapse.desc = '' if @synapse.desc.nil?
|
||||||
@synapse.desc.strip! # no trailing/leading whitespace
|
@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
|
success = nil
|
||||||
ActiveRecord::Base.transaction do
|
ActiveRecord::Base.transaction do
|
||||||
success = @synapse.save
|
success = @synapse.save
|
||||||
|
|
Loading…
Add table
Reference in a new issue