app/controllers/credit_controller.rb
# removes a credit from the parent
removes a credit from the parent
removes a credit from the parent
def destroy
	  @credit = CreditAssignment.find(params[:id])
	  @parent = @credit.primary_parent
	  @privs = @credit.privileges(@user)
	  return redir_error(TinyException::SECURITYHACK, @user) unless @privs[:edit]
	  @credit.destroy
	  render :nothing => true
	end
def destroy @credit = CreditAssignment . find ( params [ :id ] ) @parent = @credit . primary_parent @privs = @credit . privileges ( @user ) return redir_error ( TinyException :: SECURITYHACK , @user ) unless @privs [ :edit ] @credit . destroy render :nothing => true end
removes a credit from the parent
removes a credit from the parent