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 ... ) GET http://localhost:3000/showcases/21 200, OK GET http://localhost:3000/showcases/21 200, OK GET http://localhost:3000/showcases/21 200, OK
I don't where stating to check for an error... any clue ?
thanks for your feedback