I am quite new to RoR, and now I am working on a muliple file-upload
page. I want to make one very similar to the one in Gmail.
Here is the code I wrote:
In the controller:
session[:upload_count] = 0 if request.get?
session[:upload_count] += 1
render :layout => false
render :nothing => true
In the view:
Here is the problem, the attach function works fine, but when the remove
function is called, it only removes the last file field instead of the
proper one. I guess that’s because the link_to_remote tag gets
parameters dynamically here. So is there any way to solve this? Do I
have to use rjs?
One more question, I believe there is some better way other than using
session to store the upload_count variable, but I cannot find one, could
anyone give me a hint?