#44 ✓resolved
eric.fer (at gmail)

Changing first parameter of 'namespace' method doesn't change the ATOM rendered

Reported by eric.fer (at gmail) | 2010-04-27 10:23:41 UTC | in v0.8

Issue Description

The namespace definition is not changing in the ATOM feed after the first parameter of 'namespace' method in a tokamak file has been changed.

ps: I'm attaching the same description as plain text in this ticket to prevent misunderstandings due possible bad code visualization of lighthouseapp

Step-by-step

1) Initial tokamak describe_collection(@content_collection.content_references) do |collection|
collection.id = domain_content_collection_url(@content_collection.id) collection.title = @content_collection.title collection.namespace(:content_collection, domain_content_collections_url, :eager_load => false) do |content_collection|

content_collection.author = @content_collection.author
content_collection.status = @content_collection.status
content_collection.tags = @content_collection.tags

end

collection.describe_members do |member, content_reference|

member.id = content_reference.resource_id
member.links << link( :rel => :self, :href => member.id )

end end

ATOM obtained from tokamak above
http://local.dataentry.editorial.abril.com.br:3000/content_collecti... Garret Torp 2010-04-26T18:06:12-03:00 <content_collections:status>scratch</apple_pie:status> <content_collections:author>Araceli Reichert</apple_pie:author> <content_collections:tag>Arlie Schuppe IV</apple_pie:tag> <content_collections:tag>Idella Ratke</apple_pie:tag>

2) Now we changed the symbol passed to 'namespace' method from :content_collection to :apple_pie and render the ATOM again

Changed tokamak describe_collection(@content_collection.content_references) do |collection|
collection.id = domain_content_collection_url(@content_collection.id) collection.title = @content_collection.title collection.namespace(:apple_pie, domain_content_collections_url, :eager_load => false) do |content_collection|

content_collection.author = @content_collection.author
content_collection.status = @content_collection.status
content_collection.tags = @content_collection.tags

end

collection.describe_members do |member, content_reference|

member.id = content_reference.resource_id
member.links << link( :rel => :self, :href => member.id )

end end

ATOM obtained from tokamak above @@

<id>http://local.dataentry.editorial.abril.com.br:3000/content_collections/4bd5ffaaa289ba0bb8000003</id>
<title>Garret Torp</title> 
<updated>2010-04-26T18:06:12-03:00</updated> 
<apple_pie:status>scratch</apple_pie:status> 
<apple_pie:author>Araceli Reichert</apple_pie:author> 
<apple_pie:tag>Arlie Schuppe IV</apple_pie:tag> 
<apple_pie:tag>Idella Ratke</apple_pie:tag>

@@

Conclusion

The last ATOM should have the namespace name definition as 'xmlns:apple_pie' but it turned out to be 'xmlns:content_collections'

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Attachments

Pages