minor error in controller for deleting mappings

This commit is contained in:
Connor Turland 2013-01-04 21:44:16 -05:00
parent e593bbc8b2
commit b31906823a

View file

@ -138,7 +138,7 @@ class TopicsController < ApplicationController
@map = Map.find(params[:map_id])
@topic = Topic.find(params[:topic_id])
@mappings = @map.mappings.select{|m|
if m.category == "Synapse"
if m.synapse != nil
m.synapse.topic1 == @topic || m.synapse.topic2 == @topic
else
false