I have a function in my controller that loops over a div tag replacing
some text based up an updated variable set by the user.

Code:

===== Controller ======

render :update do |page|

              for i in 0..23 do
                        for j in 0..6 do
                                if ([date calculation done here])
                                   page["test_div"].replace_html
"Checked Out"
                                else
                                        page["test_div"].replace_html
"Available"
                                end
                        end
                end
end

==========

When the function is called, it only replaces a single element out of
the loop (the first).  Is there a way to render all elements?  It sounds
like RJS is the way to do this (http://www.ruby-forum.com/topic/135158)
but I still don't see how.
-- 
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to