fix "Template Not Found" error
This commit is contained in:
parent
94e937e35e
commit
5b640cf9d8
@ -24,20 +24,21 @@ class StatusController < ApplicationController
|
|||||||
|
|
||||||
# set output correctly
|
# set output correctly
|
||||||
if params[:format] == 'xml'
|
if params[:format] == 'xml'
|
||||||
@channel_xml = @channel.to_xml(channel_options).sub('</channel>', '').strip
|
@channel_output = @channel.to_xml(channel_options).sub('</channel>', '').strip
|
||||||
@feed_xml = @feeds.to_xml(:skip_instruct => true).gsub(/\n/, "\n ").chop.chop
|
@feed_output = @feeds.to_xml(:skip_instruct => true).gsub(/\n/, "\n ").chop.chop
|
||||||
elsif params[:format] == 'csv'
|
elsif params[:format] == 'csv'
|
||||||
@csv_headers = [:created_at, :status]
|
@csv_headers = [:created_at, :status]
|
||||||
|
@feed_output = @feeds
|
||||||
else
|
else
|
||||||
@channel_json = @channel.to_json(channel_options).chop
|
@channel_output = @channel.to_json(channel_options).chop
|
||||||
@feed_json = @feeds.to_json
|
@feed_output = @feeds.to_json
|
||||||
end
|
end
|
||||||
# else set error code
|
# else set error code
|
||||||
else
|
else
|
||||||
if params[:format] == 'xml'
|
if params[:format] == 'xml'
|
||||||
@channel_xml = bad_channel_xml
|
@channel_output = bad_channel_xml
|
||||||
else
|
else
|
||||||
@channel_json = '-1'.to_json
|
@channel_output = '-1'.to_json
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -46,10 +47,10 @@ class StatusController < ApplicationController
|
|||||||
|
|
||||||
# output data in proper format
|
# output data in proper format
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { render :text => @feed_json }
|
format.html { render :text => @feed_output }
|
||||||
format.json { render :action => 'feed/index' }
|
format.json { render "feed/index" }
|
||||||
format.xml { render :action => 'feed/index' }
|
format.xml { render "feed/index" }
|
||||||
format.csv { render :action => 'feed/index' }
|
format.csv { render "feed/index" }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user