Ramon – I just had a similar case with submit_tag (which creates a
submit button and calls the action associated with the form). I
solved the problem by adding a :name parameter as one of the optional
parameters, then testing for in in the submit action associated with
the form. (I am not sure if :name is special, I was just copying an
example I found :-). , for example
then in the controller, if your form action was called “manage_image”,
you can test for the presence of the specific name value in the params
hash, like so:
def manage_image
if params[‘del_image’] ##
… code to delete the image …
else
… code to add the image …
end
end