Hi, Because I want to create several draggable elements in a list, I''d like to do the following: <script type="text/javascript"> <%- elements.each do |element| -%> <%= draggable_element_js("element_#{element.id}".to_sym, :revert => true) %> <%- end -%> </script> However, if you''d try this in your app, you''ll see that this won''t work, because the quotes around the ID in the generated javascript are converted to the HTML-equivalent ("). Is this a bug or am I doing something wrong? Regards, Jaap Haagmans -- 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.
On Nov 27, 10:48 pm, jhaagmans <jaap.haagm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > Because I want to create several draggable elements in a list, I''d > like to do the following: > > <script type="text/javascript"> > <%- elements.each do |element| -%> > <%= draggable_element_js("element_#{element.id}".to_sym, :revert > => true) %> > <%- end -%> > </script> > > However, if you''d try this in your app, you''ll see that this won''t > work, because the quotes around the ID in the generated javascript are > converted to the HTML-equivalent ("). > > Is this a bug or am I doing something wrong? > > Regards, > Jaap HaagmansSorry, the .to_sym was something I tried, but I of course tried it without the .to_sym first. -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 27 nov, 23:01, jhaagmans <jaap.haagm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Nov 27, 10:48 pm, jhaagmans <jaap.haagm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi, > > > Because I want to create several draggable elements in a list, I''d > > like to do the following: > > > <script type="text/javascript"> > > <%- elements.each do |element| -%> > > <%= draggable_element_js("element_#{element.id}".to_sym, :revert > > => true) %> > > <%- end -%> > > </script> > > > However, if you''d try this in your app, you''ll see that this won''t > > work, because the quotes around the ID in the generated javascript are > > converted to the HTML-equivalent ("). > > > Is this a bug or am I doing something wrong? > > > Regards, > > Jaap Haagmans > > Sorry, the .to_sym was something I tried, but I of course tried it > without the .to_sym first.The same goes for drop_receiving_element_js, by the way. Can anyone tell me what I''m doing wrong? Regards, Jaap Haagmans -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.