Currently in a partial, I have the following:
<% @blogs.each do |blog| %>
<% fields_for "#{Time.now.to_i}", blog do |f| %>
How do I update the #{Time.now.to_i} every time the user clicks?
Currently, the Time only gets set whenever the page is loaded, is
there a way to replace this using javascript?
I''ve poured through Nest Form railscasts, as it solves a similar
problem, but I can''t seem to adapt it to my needs.
Honestly, I don''t even need to use Time, just a variable that
increments so that the form''s id''s are different and Time just
seemed
like a logical choice.
Any help on this is greatly appreciated.
--
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.