Pete Yandell
unread,Jun 19, 2011, 8:32:19 AM6/19/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Machinist Users
Hi Ary,
You definitely shouldn't try to set the type attribute in the
blueprint, any more than you'd do so on an ActiveRecord model.
make_unsaved actually calls make, so just defining Place.make like
that should work. (You won't get plan, but nobody uses that anyway.)
If I was you, though, I'd just write a helper method, and call
Machinist from that. If I was reading your tests, it wouldn't be
obvious to me that Place.make will actually return a subclass of
place. Better to make it explicit.