formatting in synapses_controller
This commit is contained in:
parent
8f59fc34d1
commit
eaa9ba4d88
1 changed files with 10 additions and 11 deletions
|
@ -70,7 +70,6 @@ class SynapsesController < ApplicationController
|
|||
|
||||
# POST synapses
|
||||
def create
|
||||
|
||||
@user = current_user
|
||||
@synapse = Synapse.new()
|
||||
@synapse.desc = params[:synapse][:desc]
|
||||
|
@ -84,7 +83,6 @@ class SynapsesController < ApplicationController
|
|||
|
||||
if params[:synapse][:map]
|
||||
@map = Map.find(params[:synapse][:map])
|
||||
|
||||
@mapping = Mapping.new()
|
||||
@mapping.category = "Synapse"
|
||||
@mapping.user = @user
|
||||
|
@ -92,7 +90,8 @@ class SynapsesController < ApplicationController
|
|||
@mapping.synapse = @synapse
|
||||
@mapping.save
|
||||
|
||||
# set the permission of the synapse to whatever the permission of the map is
|
||||
# set the permission of the synapse to whatever the permission of the
|
||||
#map is
|
||||
@synapse.permission = @map.permission
|
||||
@synapse.save
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue