This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ContactAssignmentsController < ApplicationController | |
def create | |
@organization = Organization.find(params[:org_id]) | |
# @keyword = SmsKeyword.find(params[:keyword]) | |
@question_sheets = @organization.question_sheets | |
ContactAssignment.where(:person_id => params[:ids], :question_sheet_id => @question_sheets).destroy_all | |
if params[:assign_to].present? | |
@assign_to = Person.find(params[:assign_to]) | |
params[:ids].each do |id| | |
#made it loop through question_sheets, so that all question_sheets are assigned to one person. not sure if this is the desired outcome. need to modify the counts if you want to do this. |
NewerOlder