add metadata field to channels

This commit is contained in:
Lee Lawlor
2014-06-30 13:16:22 -04:00
parent 0cf413c724
commit 0f0ff33b54
22 changed files with 154 additions and 15 deletions

View File

@ -531,7 +531,7 @@ class ChannelsController < ApplicationController
# only allow these params
def channel_params
params.require(:channel).permit(:name, :url, :description, :latitude, :longitude, :field1, :field2, :field3, :field4, :field5, :field6, :field7, :field8, :elevation, :public_flag, :status, :video_id, :video_type)
params.require(:channel).permit(:name, :url, :description, :metadata, :latitude, :longitude, :field1, :field2, :field3, :field4, :field5, :field6, :field7, :field8, :elevation, :public_flag, :status, :video_id, :video_type)
end
# determine if the date can be parsed

View File

@ -34,12 +34,12 @@ class FeedController < ApplicationController
# set output correctly
if params[:format] == 'xml'
@channel_output = channel.to_xml(channel.select_options).sub('</channel>', '').strip
@channel_output = channel.to_xml(channel.select_options(params)).sub('</channel>', '').strip
@feed_output = feeds.to_xml(:skip_instruct => true).gsub(/\n/, "\n ").chop.chop
elsif params[:format] == 'csv'
@feed_output = feeds
else
@channel_output = channel.to_json(channel.select_options).chop
@channel_output = channel.to_json(channel.select_options(params)).chop
@feed_output = feeds.to_json(:only => feed_factory.feed_select_options)
end
@ -246,7 +246,7 @@ class FeedController < ApplicationController
@time_after_sort = Time.now
@channel_output = channel.to_json(channel.select_options).chop
@channel_output = channel.to_json(channel.select_options(params)).chop
@feed_output = feeds.to_json
@time_after_json = Time.now