AaronLasseigne / active_interaction

:briefcase: Manage application specific business logic.
MIT License
2.07k stars 137 forks source link

Support for array of classes for the object filter #516

Closed danilobarion1986 closed 2 years ago

danilobarion1986 commented 2 years ago

Hey! Wouldn't it be good to have the possibility of passing an array of classes to the object filter? So we could do something like this:

object :foo, class: [Bar, Baz]

antulik commented 2 years ago

@danilobarion1986 as a workaround you can use multiple classes with this extension https://github.com/antulik/active_interaction-extras/#object-multiple-classes

AaronLasseigne commented 2 years ago

It seems like you'd be better off using a parent class and referencing that or using interface to make sure they behave the same. If that doesn't meet your need though, the extras extension should do the trick.