ATOM serializer

Dear devs,

I am trying to make the atom serializer in raw/util/atom.rb work.
I create a new simpler (and faster) version. This seems to work with
reader but It does not show any kind of summary
in Firefox (when viewing the feed).

Here is an example:

Can anyone on this list spot the problem(s) with this feed?

Please help me debug this once and for all.


Try the W3C validator:

It reports a few issues that you might want to solve before doing more


George M. schreef:


This patch doesn’t fix much but does two useful things:

  • issue a warning if there is no model annotation on the controller
  • check if the serialized object respond_to?(:author) before calling

From looking at Syndication | Atom Enabled and
at the W3C validator it seems the biggest issues are:

  • id’s should be complete IRI’s (a superset of URI’s). Relative URL’s
    are not valid.
  • the updated (timestamp) element is mandatory, both on the feed as on
    the entries

For the second thing I would assume this could be done to play nicely
with ‘is Timestamped’ ?

As it stands this nice functionality is still undocumented, but for the
adventurous this might help you get started:

class RandomController
ann :self, :model => RandomThing

def index
@random_things = RandomThing.all

class RandomThing
attr :title, String
attr :author, String

def body
“you need this method”

app.dispatcher.root.random = RandomController

go to http://localhost:9000/random.atom

Have fun!


Arne B. schreef:

Thanks for the patch. I will work on this further.