On Monday, 14 January 2013 13:34:29 UTC-5, Guilherme Reis wrote:
> i could put :if => proc { |record| record.type == 'C' } on the validations > and put the validations at A class. But it wouldn't make sense to have the > subclasses. The difference basically of B and C is only in the validation > behavior. (I have many validations on both types) > Are you positive A, B and C should really be separate classes? The fact that there are transitions that change classes makes it sound a lot like there's really a statemachine here, not a class hierarchy... --Matt Jones -- 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. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/b1z0OH96yBoJ. For more options, visit https://groups.google.com/groups/opt_out.