On Mon, Feb 8, 2010 at 3:23 PM, ct9a
<anexiole-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I recently used observers in other parts of my application and really
> like how neat it is (ie. controllers don''t have to be carrying
extra
> notification logic).
>
> Now, I have another functionality for which users of the site can
> fill in a form for enquiries.
> Yes, I do have an "enquiries" database table set up.
>
> My question is, should I be using observers for an enquiry?
> I know that observer methods only take 1 object but how do I access
> the contents of the form (ie. params)?
Checking out the observer pattern might help you out on deciding if
this is an observer or not.
You might use an observer to send off an email for the enquiry or the
like, but most of the logic would be in the enquiry model.
Mikel
--
http://lindsaar.net/
--
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.