I’m having some problem to load a new page in a modal with bootstrap on
Rails.
Here is the important part on my eventos/index.html.erb
<% @eventos.each do |evento| %>
**<%= link_to(evento, :class=>"mosaic-overlay", :id => "evento" ,
"data-toggle" => "modal", 'data-target' => '#eventoModal') do %>**
<%end%>
<% end %>
<%= evento.local %> - <%= evento.data.to_time.strftime('%e/%m') %>
Mais+
<%= image_tag
evento.attachment.url(:small) %>
As you can see there is a link_to to my “evento” (rendered html:
a href="/eventos/1" class=“mosaic-overlay” data-target="#eventoModal"
data-toggle=“modal” id=“evento”
But when I click the link, nothing happens (before add the modal it was
working)
Here is evento/show.html.erb
Some code
and finally on my assets/javascripts/eventos.js.coffe I have this:
$(’#eventoModal’).modal(options)
Anyone can help me show the evento/show.html.erb in a modal on the
evento/index.html.erb page?