我在https://github.com/hiq5/prettyphoto-rails中做了所有使用 prettyPhoto 的说明。
我这样做是为了显示一张照片(不是画廊)
=link_to image_tag(photo.photo_url(:thumb).to_s, :alt => photo.name ,:class => "img-polaroid"), photo.photo_url, :rel => 'prettyPhoto'
但仍然重定向到照片 url 并显示照片,并且不使用 jQuery 在当前页面上显示它。
我用chrome开发工具检查它,没有任何错误。
我使用haml 生成视图(而不是erb),并使用carrierwave 上传照片。顺便说一句,我使用 twitter 引导程序。
任何帮助表示赞赏。