On 28 May 2011 17:10, egervari <ken.egerv...@gmail.com> wrote: > I found one way to achieve this, but I'm disturbed by it: > > alias_method :old_parent=, :parent= > > def parent=(value) > self.old_parent = value
I use this method on occasion. If you're going to do your: if value.subject.start_with?('Re:') ...it's worth checking that "value.respond_to?(:subject)" or that "value.is_a?(Parent)" first. -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.