Simplified json rendering.

This commit is contained in:
Martin Edenhofer 2012-04-14 18:47:37 +02:00
parent 6047e63666
commit 7b3d341568

View file

@ -67,9 +67,7 @@ class TicketOverviewsController < ApplicationController
result.push all.merge( { :count => count } )
}
respond_to do |format|
format.json { render :json => result }
end
render :json => result
return
end
@ -110,8 +108,6 @@ class TicketOverviewsController < ApplicationController
}
# return result
respond_to do |format|
format.json {
render :json => {
:overview => overview_selected,
:tickets => tickets,
@ -123,8 +119,6 @@ class TicketOverviewsController < ApplicationController
}
},
}
}
end
end
@ -157,8 +151,6 @@ class TicketOverviewsController < ApplicationController
}
# return result
respond_to do |format|
format.json {
render :json => {
# :ticket => ticket,
# :articles => articles,
@ -178,8 +170,6 @@ class TicketOverviewsController < ApplicationController
}
}
}
}
end
end
# GET /ticket_full/1
@ -230,8 +220,6 @@ class TicketOverviewsController < ApplicationController
log_view(ticket)
# return result
respond_to do |format|
format.json {
render :json => {
:ticket => ticket,
:articles => articles,
@ -242,8 +230,6 @@ class TicketOverviewsController < ApplicationController
}
}
}
}
end
end
# POST /ticket_attachment/new
@ -268,13 +254,9 @@ class TicketOverviewsController < ApplicationController
)
# return result
respond_to do |format|
format.json {
render :json => {
:success => true,
}
}
end
end
# GET /ticket_attachment/1
@ -340,8 +322,6 @@ class TicketOverviewsController < ApplicationController
# end
# return result
respond_to do |format|
format.json {
render :json => {
:tickets => {
:open => tickets_open,
@ -349,8 +329,6 @@ class TicketOverviewsController < ApplicationController
}
# :users => users,
}
}
end
end
# GET /ticket_history/1
@ -377,8 +355,6 @@ class TicketOverviewsController < ApplicationController
history_attributes = History::Attribute.all()
# return result
respond_to do |format|
format.json {
render :json => {
:ticket => ticket,
:users => users,
@ -387,8 +363,6 @@ class TicketOverviewsController < ApplicationController
:history_types => history_types,
:history_attributes => history_attributes
}
}
end
end
# GET /activity_stream
@ -419,15 +393,11 @@ class TicketOverviewsController < ApplicationController
}
# return result
respond_to do |format|
format.json {
render :json => {
:activity_stream => activity_stream,
:tickets => tickets,
:users => users,
}
}
end
end
# GET /recent_viewed
@ -458,15 +428,11 @@ class TicketOverviewsController < ApplicationController
}
# return result
respond_to do |format|
format.json {
render :json => {
:recent_viewed => recent_viewed,
:tickets => tickets,
:users => users,
}
}
end
end
# GET /user_search
@ -497,10 +463,6 @@ class TicketOverviewsController < ApplicationController
end
# return result
respond_to do |format|
format.json {
render :json => users
}
end
end
end