I changed the helm/html code as it might not be standard to put a din
inside an <a> tag , but same issue Ajax GET request sent 3 times

        - @category.showcases.each do |showcase|
                .showcaseSelector{:style => "border-color: #{showcase ==
@selected_showcase ? 'black' : 'transparent'}; background-color:
##{showcase[:color]};"}
                        =  link_to '', showcase_url(showcase), :remote => true

On 22 oct, 19:03, Erwin <[email protected]> wrote:
> I wrote in my view :
>
> #showcases
>         - @category.showcases.each do |showcase|
>                 %a{'data-remote' => 'true', :href => 
> "#{showcase_url(showcase)}"}
>                         .showcaseSelector{:style => "border-color: #{showcase 
> ==
> @selected_showcase ? 'black' : 'transparent'}; background-color:
> ##{showcase[:color]};"}
>
> which generate the following html :  ( seems correct , 2 links with
> colored boxes
>
> <div id="showcases">
>   <a href="http://localhost:3000/showcases/20"; data-remote="true">
>     <div style="border-color: transparent; background-color: #2a6996;"
> class="showcaseSelector"></div>
>   </a>
>
>   <a href="http://localhost:3000/showcases/21"; data-remote="true">
>     <div style="border-color: black; background-color: #b39117;"
> class="showcaseSelector"></div>
>   </a>
> </div>
>
> when I click on a link , I can see 3 requests in my console ( and 3
> times the show action executed ... )
> GEThttp://localhost:3000/showcases/21 200, OK
> GEThttp://localhost:3000/showcases/21 200, OK
> GEThttp://localhost:3000/showcases/21 200, OK
>
> I don't where stating to check for an error...  any clue ?
>
> thanks for your feedback

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to