0
我無法得到如何把部分中的模態。請幫幫我 !如何在部分中放置模態?
我有按鈕:
<a class="btn btn-large" data-toggle="modal" href="#show_me_modal"
onclick="printpage()">Name of button<sup>TM</sup> message in action</a>
和DIV模式:
<div class="modal hide fade" id="show_me_modal">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
</div>
<div class="modal-body">
<p>some text</p>
<ul class="media-grid">
<%= image_tag("/images/pic02.png") %>
</ul>
</div>
<div class="modal-footer">
<b><%= link_to "#", '#' %></b>
</div>
</div>
感謝您的幫助,但意味着modal_link? 我應該寫LINK這個<%= link_to「註冊」,「myModal」%>或者什麼? 當我把你的代碼(渲染到模態) 未定義的方法'模態' 而我應該只是把我的模態股份進入Regitration形式是? – skrypalyk
'modal_link'生成鏈接到您的模型(鏈接到源)。檢查'modal_caller'方法來理解我在說什麼。 'modal'方法是Helper方法,它應該可以在你的視圖中訪問,在Rails 3中,Helper被自動包含並且可以在所有視圖中訪問。 – thesis
你讀過我的代碼嗎? 'modal_caller'在那裏。你創建了modal_helper.rb嗎? – thesis