Hi, has anyone experienced any problems with the new link_to and data-confirm in Rails3? It seems when you create a link with instead of link text, an image, the confirm message isn''t shown. <% link_to( image_tag("delete.png", :alt => t("helpers.label.destroy")), admin_category_path(:id => record, :format => :js), "data-method" => "delete", "data-confirm" => "#{t("categories.delete")}", :remote => true ) %> The above example deletes the record without asking confirmation first. <%= link_to("Delete", admin_category_path(:id => record, :format => :js), "data-method" => "delete", "data-confirm" => "#{t("categories.delete")}", :remote => true) %> The above example here, where the only difference is instead of an image, you have a text link, the confirmation message is show. -- 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 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.
Did you find a solution to this? I just hit this myself last night and have spent a few hours trying to find an answer. -- 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 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.
Hi Ray, I fixed the problem some time ago, but I''m not sure anymore what the problem was. I know I had some other problems as well, And they where all related to a conflicting javascript library that I developed. It was not conflicting with rails.js but with prototype.js . I know I also upgraded the rails.js file to the latest version as well as prototype (1.7 rc) Ray Parker wrote:> Did you find a solution to this? I just hit this myself last night and > have spent a few hours trying to find an answer.-- 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 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.
I''ll check into 1.7. I confirmed that this is a problem with Rails3.beta4: Create a new project, generate a scaffold for some Foo class. Confirm that the delete link from the index page gives you a confirmation dialog. Change the "Destroy" text to an image_tag and the confirmation no longer works. I read somewhere else that this was an issue with the JS library and the way that it''s referring to page elements.> I know I also upgraded the rails.js file to the latest version as well > as prototype (1.7 rc)-- 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 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.