rupert wrote:
> can you not just do:
>
> case e
> when EventOne
> puts 'One'
> when EventTwo
> puts 'Two'
> else
> puts "Unknown event type #{e.type}"
> end
>
> ....as the proxy will return true to being of the type EventOne (or
> EventTwo)
>
> hth - Rupert
>
>
That's what I initially had. It work fine for ActiveRecord (from which
I'm migrating), but not for DataMapper. With AR, e is of type
#<EventOne>, but with DM it's something like #<EventOne:0xb79e557c>
It looks like DM is tacking on some sort of address, which blows up ==
and ===.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DataMapper" 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/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---