<project> <active type="boolean">true</active> <archived type="boolean">false</archived> <created-at type="datetime">2008-05-22T19:53:59Z</created-at> <id type="integer">652</id> <name>Funny Stuff</name> <total-expenses type="decimal">0.00</total-expenses> <total-time type="integer">13197</total-time> <updated-at type="datetime">2008-05-28T23:49:26Z</updated-at> <user-id type="integer">232</user-id> <summed-time nil="true"/> </project> I have a resource that I am communicating with fine, but I am unable to process certain elements, particularly elements with dashes in the name such as "total-time". I''m getting an error message of "undefined method `total'' for #..." here is my pertinent template code: <%= @details.total-time %> I''m researching this now but I cant find any past instances of it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Auston Bunsen wrote:> <project> > <active type="boolean">true</active> > <archived type="boolean">false</archived> > <created-at type="datetime">2008-05-22T19:53:59Z</created-at> > <id type="integer">652</id> > <name>Funny Stuff</name> > <total-expenses type="decimal">0.00</total-expenses> > <total-time type="integer">13197</total-time> > <updated-at type="datetime">2008-05-28T23:49:26Z</updated-at> > <user-id type="integer">232</user-id> > <summed-time nil="true"/> > </project> > > I have a resource that I am communicating with fine, but I am unable > to process certain elements, particularly elements with dashes in the > name such as "total-time". > > I''m getting an error message of "undefined method `total'' for #..." > > here is my pertinent template code: > <%= @details.total-time %> > > I''m researching this now but I cant find any past instances of it.Try @details.total_time I believe - gets translated to _ in the XML conversion -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
This is correct. Thanks! On May 28, 8:09 pm, Alex Wayne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Auston Bunsen wrote: > > <project> > > <active type="boolean">true</active> > > <archived type="boolean">false</archived> > > <created-at type="datetime">2008-05-22T19:53:59Z</created-at> > > <id type="integer">652</id> > > <name>Funny Stuff</name> > > <total-expenses type="decimal">0.00</total-expenses> > > <total-time type="integer">13197</total-time> > > <updated-at type="datetime">2008-05-28T23:49:26Z</updated-at> > > <user-id type="integer">232</user-id> > > <summed-time nil="true"/> > > </project> > > > I have a resource that I am communicating with fine, but I am unable > > to process certain elements, particularly elements with dashes in the > > name such as "total-time". > > > I''m getting an error message of "undefined method `total'' for #..." > > > here is my pertinent template code: > > <%= @details.total-time %> > > > I''m researching this now but I cant find any past instances of it. > > Try @details.total_time > > I believe - gets translated to _ in the XML conversion > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---