Hi all, I am using :confirm=>"Are you sure ?" for delte fuunctionality so that i ''ll be getting a pop up box "Are you sure?" But I want the name or id of the element to be deleted on the pop up box. Eg: If i delete , i should get Are you sure to delete id# 1?.. so can anybody help me in doing this?? Thanks in Advance , harish -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, 28 Dec 2006 13:35:21 +0100 Naga harish Kanegolla <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi all, > I am using :confirm=>"Are you sure ?" for delte fuunctionality so > that i ''ll be getting a pop up box "Are you sure?" But I want the name > or id of the element to be deleted on the pop up box. Eg: If i > delete , i should get Are you sure to delete id# 1?.. > so can anybody help me in doing this?? > > Thanks in Advance , > harish >Try using :confirm => "Are you sure you want to delete #{@obj.id}?" --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, I tried this but I am getting the whole line in the popup. like Are you sure you want to delete #{@obj.id}?, Its no ttaking the value. Is there any other type to do this?? Jason Stewart wrote:> On Thu, 28 Dec 2006 13:35:21 +0100 > Naga harish Kanegolla <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > >> > Try using :confirm => "Are you sure you want to delete #{@obj.id}?"-- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Naga harish Kanegolla wrote:> Hi, > I tried this but I am getting the whole line in the popup. like Are you > sure you want to delete #{@obj.id}?, Its no ttaking the value. Is there > any other type to do this?? > > Jason Stewart wrote: >> On Thu, 28 Dec 2006 13:35:21 +0100 >> Naga harish Kanegolla <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> >>> >> Try using :confirm => "Are you sure you want to delete #{@obj.id}?"Make sure you are using double quotes on that :confirm. You must use the double quotes so that it will interpolate the variable. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---