Hi gang,

I am trying to define a method on an ActiveRecord model that simulates
the push operator of an array (or enumerable). I was wondering if it's
possible to do something similar to defining a setter, like this...

def product_tags<<(tag)
  # do some pre processing...
  # save tag to an AR association
end

My guess is it needs to be implemented with an actual array. Anyone
have any experience with this? Or do I just have a problem with my
syntax?

Thanks,
Peter
--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to