Sha256: 84308e8cea97d41535d25c38d46baf58e30c0b720ef845fe8d6774a7181506ad
Contents?: true
Size: 561 Bytes
Versions: 49
Compression:
Stored size: 561 Bytes
Contents
class AssignmentsController < ApplicationController before_filter :authenticate_user! def create @ticket = Ticket.find params[:ticket_id] @assignment = @ticket.assignments.build( assignment_params.merge(assigner: current_user) ) respond_to do |format| format.js end end def update # as one would have it end def destroy assignment = Assignment.find params[:id] assignment.destroy end private def assignment_params params.require(params[:assignment]).permit(:user_id, :priority) end end
Version data entries
49 entries across 49 versions & 1 rubygems