I''ve decided on a different approach and I could use some help:
The page containing the records to modify also contains a small form to
filter the displayed records. It uses observe_form to periodically call
a function to filter the view.
I want to use this form filter as a selector on which records to update
- it will be a two step process:
1. the user picks which records to update by applying the filter.
2. the user will update attributes using a different form.
The filter works by taking the selected attributes in it''s form and
calling a helper function that returns a :conditions array "cond" to
use
with activerecord''s find function - @products = Product.find(:all,
:conditions => cond).
This is all fine, but I have one problem - how can get have the
filter''s
conditions available to the updating function (which isn''t called from
the observe_form helper)?
If I could have the :conditions available when I search which records to
update, then everything will be simpler. Any advice will be more than
welcomed :)
--
Posted via 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
groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---