Karim Maknojia
2007-Apr-10 16:47 UTC
warning: Object#id will be deprecated; use Object#object_id
Hello friends,
I am getting this warning *warning: Object#id will be deprecated; use
Object#object_id* on the following line of code
def to_s()
output = "\nDO Class: " + self.class.to_s() + "\n"
output += " id: " + id().to_s() + "\n"
output += " position: " + position.to_s() + "\n"
output += " photo_id: " + photo.id().to_s() + "\n"
*output += " slideshow_id: " + slideshow.id().to_s() +
"\n"
* output += "end"
return output
end
I dont know what does it mean. I will appreciate if any one can help me in
this.
Thank you in advance
karry
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
Ben Munat
2007-Apr-10 19:10 UTC
Re: warning: Object#id will be deprecated; use Object#object_id
I would think that somehow slideshow does not hold an active record object when it gets to that line... so it call the deprecated Object.id instead. b Karim Maknojia wrote:> Hello friends, > I am getting this warning *warning: Object#id will be deprecated; use > Object#object_id* on the following line of code > > def to_s() > output = "\nDO Class: " + self.class.to_s() + "\n" > output += " id: " + id().to_s() + "\n" > output += " position: " + position.to_s() + "\n" > output += " photo_id: " + photo.id().to_s() + "\n" > *output += " slideshow_id: " + slideshow.id().to_s() + "\n" > * output += "end" > return output > end > > I dont know what does it mean. I will appreciate if any one can help me > in this. > Thank you in advance > karry > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---