Mail filters like functionality in Ruby on Rails

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.,

Shan Kris wrote in post #967422:

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.,

Best,

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 :slight_smile:

Hi Marnen,

1. These requests will be both e-mail and as well as requests through
web interface.

2. These filter objects are user/account based, so they need to be
persisted in database. Also, should be editable from UI.

3. I might not need state traversals. Act_as_state_machine is bit
advanced at this point of time.

Thanks for the response.

-Shan

Marnen Laibow-Koser wrote in post #967433:

Hi Hassan,

Earlier, I have tried searching both 'Ruby version of Drool' and 'Ruby
Rules Engine', didn't get exactly what I was looking for.

Thanks,
Shan

Hassan Schroeder wrote in post #967482: