mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-08 00:34:19 +01:00
Removed SimplyHelpful plugin (functionality has been rolled into Rails) and modified ResourceFeeder as necessary.
This commit is contained in:
parent
2c09db45c5
commit
58974ec138
21 changed files with 6 additions and 755 deletions
|
|
@ -3,6 +3,7 @@ require 'resource_feeder/common'
|
|||
module ResourceFeeder
|
||||
module Atom
|
||||
include ResourceFeeder::Common
|
||||
include ActionController::Routing
|
||||
extend self
|
||||
|
||||
def render_atom_feed_for(resources, options = {})
|
||||
|
|
@ -25,14 +26,14 @@ module ResourceFeeder
|
|||
|
||||
options[:feed][:title] ||= klass.name.pluralize
|
||||
options[:feed][:id] ||= "tag:#{request.host_with_port}:#{klass.name.pluralize}"
|
||||
options[:feed][:link] ||= SimplyHelpful::PolymorphicRoutes.polymorphic_url(new_record, options[:url_writer])
|
||||
options[:feed][:link] ||= polymorphic_url(new_record, :controller => options[:url_writer])
|
||||
|
||||
options[:item][:title] ||= [ :title, :subject, :headline, :name ]
|
||||
options[:item][:description] ||= [ :description, :body, :content ]
|
||||
options[:item][:pub_date] ||= [ :updated_at, :updated_on, :created_at, :created_on ]
|
||||
options[:item][:author] ||= [ :author, :creator ]
|
||||
|
||||
resource_link = lambda { |r| SimplyHelpful::PolymorphicRoutes.polymorphic_url(r, options[:url_writer]) }
|
||||
resource_link = lambda { |r| polymorphic_url(r, :controller => options[:url_writer]) }
|
||||
|
||||
xml.instruct!
|
||||
xml.feed "xml:lang" => "en-US", "xmlns" => 'http://www.w3.org/2005/Atom' do
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ require 'resource_feeder/common'
|
|||
module ResourceFeeder
|
||||
module Rss
|
||||
include ResourceFeeder::Common
|
||||
include ActionController::Routing
|
||||
extend self
|
||||
|
||||
def render_rss_feed_for(resources, options = {})
|
||||
|
|
@ -25,7 +26,7 @@ module ResourceFeeder
|
|||
use_content_encoded = options[:item].has_key?(:content_encoded)
|
||||
|
||||
options[:feed][:title] ||= klass.name.pluralize
|
||||
options[:feed][:link] ||= SimplyHelpful::PolymorphicRoutes.polymorphic_url(new_record, options[:url_writer])
|
||||
options[:feed][:link] ||= polymorphic_url(new_record, :controller => options[:url_writer])
|
||||
options[:feed][:language] ||= "en-us"
|
||||
options[:feed][:ttl] ||= "40"
|
||||
|
||||
|
|
@ -33,7 +34,7 @@ module ResourceFeeder
|
|||
options[:item][:description] ||= [ :description, :body, :content ]
|
||||
options[:item][:pub_date] ||= [ :updated_at, :updated_on, :created_at, :created_on ]
|
||||
|
||||
resource_link = lambda { |r| SimplyHelpful::PolymorphicRoutes.polymorphic_url(r, options[:url_writer]) }
|
||||
resource_link = lambda { |r| polymorphic_url(r, :controller => options[:url_writer]) }
|
||||
|
||||
rss_root_attributes = { :version => 2.0 }
|
||||
rss_root_attributes.merge!("xmlns:content" => "http://purl.org/rss/1.0/modules/content/") if use_content_encoded
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue