setting entry id with rails' atom_feed helper

amit123a

New Member
I am using the atom feed builder method in Rails 3.2.2 to create a custom atom feed for a model's index method. I need to set the feed entry ids to a custom url. Currently the builder looks like this:\[code\]atom_feed ({:id => request.url}) do |feed| feed.title "Title" feed.author do |author| author.name @user.name end feed.category("term" => "thing feed") feed.updated @things.first.created_at if @things.any? @things.each do |thing| feed.entry (thing) do |entry| [... setting the entry with some thing attributes] end endend\[/code\]How can I set the id for the feed entry item? Doing something like \[code\]entry.id "foo"\[/code\]does not work because it creates a duplicate id node rather than overwrite the default one. Like wise putting it as a part of feed.entry parameter, like I do with the configuration hash passed to atom_feed does not work because it is a syntax error. Would appreciate help! Thanks
 
Back
Top