This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# RSS-aware patched helper. See http://www.zephyros-systems.co.uk/blog/?p=179 | |
# | |
require 'set' | |
module ActionView | |
# = Action View Atom Feed Helpers | |
module Helpers #:nodoc: | |
module AtomFeedHelper | |
# Adds easy defaults to writing Atom feeds with the Builder template engine (this does not work on ERb or any other |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Calendar | |
include DataMapper::Resource | |
has n, :events | |
property :id, Serial | |
property :slug, Slug | |
property :title, String | |
property :published, Boolean | |
property :created_at, DateTime | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def consolidate(*issue_uris) | |
result = Nokogiri::XML.parse '<issues />' | |
issue_uris.each do |uri| | |
fetch_doc(uri).css('issue').each do |issue| | |
if issue.comments.content.to_i > 0 then | |
issue.comments.unlink | |
comments_doc = fetch_doc("#{@comments_base}/#{issue.number.content}") | |
comments_doc.comments.parent = issue | |
end |
NewerOlder