changed maps controller so it accepts synapses as a csv list
This commit is contained in:
parent
647467e97a
commit
e481dcd822
1 changed files with 23 additions and 9 deletions
|
@ -74,6 +74,20 @@ class MapsController < ApplicationController
|
||||||
@mapping.yloc = topic[2]
|
@mapping.yloc = topic[2]
|
||||||
@mapping.save
|
@mapping.save
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if params[:map][:synapsesToMap]
|
||||||
|
@synAll = params[:map][:synapsesToMap]
|
||||||
|
@synAll = @synAll.split(',')
|
||||||
|
@synAll.each do |synapse|
|
||||||
|
@mapping = Mapping.new()
|
||||||
|
@mapping.category = "Synapse"
|
||||||
|
@mapping.user = @user
|
||||||
|
@mapping.map = @map
|
||||||
|
@mapping.synapse = Synapse.find(synapse[0])
|
||||||
|
@mapping.save
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
@map.arranged = true
|
@map.arranged = true
|
||||||
@map.save
|
@map.save
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
Loading…
Reference in a new issue