For my new project, I need a functionality like mail filters. There will
be a set of rules with associated actions. When an user submits a
request, it needs to be passed through these rules for filtering. In
case any one of these rules matches, the corresponding action should be
triggered (the model will be updated with a few more attributes or an
email will be to a few people etc.,). Just like mail filters.
And, these rules will be user specific and stored as ActiveRecord
models.
Any pointers for existing gems?!
My ROR version is 2.3.8
P.S :- This will be more of business rules. For ex.,
In a CRM application, if the request is from a particular company or for
a particular product or based on timezone etc., assign to this group,
set it to high priority etc.,
For my new project, I need a functionality like mail filters. There will
be a set of rules with associated actions. When an user submits a
request, it needs to be passed through these rules for filtering.
Will these requests be submitted as e-mail or through the Web interface?
In
case any one of these rules matches, the corresponding action should be
triggered (the model will be updated with a few more attributes or an
email will be to a few people etc.,). Just like mail filters.
And, these rules will be user specific and stored as ActiveRecord
models.
Any pointers for existing gems?!
Do you need any? This should be pretty easy to build: just make a bunch
of Filter objects and process them in some specified order.
If you need to track request state, acts_as_state_machine might help.
My ROR version is 2.3.8
If this is a new project, as you say above, please start with the
current version of Rails, which is now 3.0.1.
P.S :- This will be more of business rules. For ex.,
In a CRM application, if the request is from a particular company or for
a particular product or based on timezone etc., assign to this group,
set it to high priority etc.,
I could have sworn I'd seen a Ruby version of Drools, but can't find it
now; in any case google `ruby rules engine` and you'll get some things
to check out