Quoting mjijackson <[email protected]>: > > I'm upgrading from 2.1 to 2.3 and having a small problem with my > models. It appears that when I use self.id now (say, from inside an > instance method) I'm getting an array back instead of a string. For > example, where under 2.1 I would get a "7" I'm now getting a ["7"]. > Why the changed behavior? >
My experience is that using the .id method is unreliable. Sometimes it is interpreted as the object ID which is deprecated instead of the id column of the database row. self[:id] always works as expected, in my experience. HTH, Jeffrey --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

