Reenabled notifications.

This commit is contained in:
Martin Edenhofer 2012-04-16 14:56:04 +02:00
parent 879ba366ab
commit 5de91cae96
3 changed files with 20 additions and 4 deletions

View file

@ -27,13 +27,17 @@ class TicketArticlesController < ApplicationController
)
if @article.save
render :json => @article, :status => :created
# remove attachments from upload cache
Store.remove(
:object => 'UploadCache::TicketZoom::' + current_user.id.to_s,
:o_id => @article.ticket_id
)
# execute ticket events
Ticket::Observer::Notification.transaction
render :json => @article, :status => :created
else
render :json => @article.errors, :status => :unprocessable_entity
end
@ -44,6 +48,10 @@ class TicketArticlesController < ApplicationController
@article = Ticket::Article.find(params[:id])
if @article.update_attributes(params[:ticket_article])
# execute ticket events
Ticket::Observer::Notification.transaction
render :json => @article, :status => :ok
else
render :json => @article.errors, :status => :unprocessable_entity

View file

@ -55,7 +55,10 @@ class TicketsController < ApplicationController
:o_id => @article.ticket_id
)
end
# execute ticket events
Ticket::Observer::Notification.transaction
render :json => @ticket, :status => :created
end
@ -64,6 +67,10 @@ class TicketsController < ApplicationController
@ticket = Ticket.find(params[:id])
if @ticket.update_attributes(params[:ticket])
# execute ticket events
Ticket::Observer::Notification.transaction
render :json => @ticket, :status => :ok
else
render :json => @ticket.errors, :status => :unprocessable_entity
@ -75,6 +82,9 @@ class TicketsController < ApplicationController
@ticket = Ticket.find(params[:id])
@ticket.destroy
# execute ticket events
Ticket::Observer::Notification.transaction
head :ok
end
end

View file

@ -117,8 +117,6 @@ class Channel::EmailParser
)
end
end
return true
end
# execute ticket events