Rails prettyPhoto does not show photo with jquery (instead redirect to photo page)

Posted by dare on Stack Overflow See other posts from Stack Overflow or by dare
Published on 2012-09-10T11:46:26Z Indexed on 2012/09/10 21:38 UTC
Read the original article Hit count: 416

i do all instruction for use prettyPhoto in https://github.com/hiq5/prettyphoto-rails.

and i do this to show a single photo( not gallery )

=link_to image_tag(photo.photo_url(:thumb).to_s, :alt => photo.name ,:class => "img-polaroid"), photo.photo_url, :rel => 'prettyPhoto'

but still redirect to photo url and show photo, and doesn't use jQuery to show it on the current page.

i check it with chrome development tools, there isn't any error.

i use haml to generate views (instead erb), and carrierwave to upload photos. by the way I use twitter bootstrap.

any help is appreciated.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about carrierwave