0
我想讓prettyphoto在我的Rails應用程序中工作。我希望在由paperclip gem上傳的prettyphoto中顯示圖像。Prettyphoto和Rails
我正在運行導軌3.2.8,回形針3.1.4和hiq5/prettyphoto-rails gem。
以下是我在身體的末尾:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto({
animationSpeed: 'normal', /* fast/slow/normal */
padding: 40, /* padding for each side of the picture */
opacity: 0.35, /* Value betwee 0 and 1 */
showTitle: false, /* true/false */
allowresize: true, /* true/false */
counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
theme: 'light_rounded' /* light_rounded/dark_rounded/light_square/dark_square */
});
});
</script>
這裏的link_to導軌:
<%= link_to image_tag(@client.price_plan.flier1.url(:small)), @client.price_plan.flier1.url(:medium), rel: "prettyPhoto" %>
我認爲這個問題可能是該紙夾以字符串創建鏈接到底?
例子:
http://localhost:3000/price_plans/flier1s/3/small_1180001_SF6w.jpg?1345698254
是否prettyphoto需要1345698254剝離工作的聯繫?
例子:
http://localhost:3000/price_plans/flier1s/3/small_1180001_SF6w.jpg
如果是這樣,我怎麼能在回形針這樣做嗎?
謝謝,