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
Google
reader but It does not show any kind of summary
in Firefox (when viewing the feed).
Here is an example:
http://me.gr/blog/index.atom
Can anyone on this list spot the problem(s) with this feed?
Please help me debug this once and for all.
thanks,
George.
Try the W3C validator:
http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.me.gr%2Fblog%2Findex.atom
It reports a few issues that you might want to solve before doing more
testing.
(ab)
George M. schreef:
Hi,
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
#author
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
end
end
class RandomThing
attr :title, String
attr :author, String
def body
“you need this method”
end
end
app.dispatcher.root.random = RandomController
go to http://localhost:9000/random.atom
Have fun!
(ab)
Arne B. schreef:
Thanks for the patch. I will work on this further.
-g.