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., -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2010-Dec-09 14:58 UTC
Re: Mail filters like functionality in Ruby on Rails
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.8If 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, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org Sent from my iPhone -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hassan Schroeder
2010-Dec-09 17:35 UTC
Re: Mail filters like functionality in Ruby on Rails
On Thu, Dec 9, 2010 at 5:59 AM, Shan Kris <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> For my new project, I need a functionality like mail filters. There will > be a set of rules with associated actions.> P.S :- This will be more of business rules. For ex.,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 :-) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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:> 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, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > Sent from my iPhone-- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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:> On Thu, Dec 9, 2010 at 5:59 AM, Shan Kris <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >> For my new project, I need a functionality like mail filters. There will >> be a set of rules with associated actions. > >> P.S :- This will be more of business rules. For ex., > > 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 :-) > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan-- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.