Well, that kind of logic doesn''t really belong in the view, anyway, it
really should be in the controller. So - your observe_form sends all
''changes'' to your controller, and in your controller you can
evaluate
what has been sent and whether or not anything should be done in the
view, and act accordingly. Since it''s all happening in the
''background''
anyway, i.e., as a remote AJAX call, if your controller decides that
nothing should be done, your users aren''t going to notice.
c.
Stuart Fellowes wrote:> It seems like the observe magic is more about noticing changes to the
> form,
> as opposed to be able to discriminate what''s being done.
> To clarify what I''m saying since I''m tired and probably
not making any
> sense
> -
> The form knows when a user makes a selection, but when the user
> de-selects
> it detects a change and sends things through However what it
can''t do
> is
> detect that nothing should be sent, meaning blank values.
> Hope I''m making some sense here. Perhaps there is a better way to
> control
> it?
>
> Stuart
>
> --
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---