CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Ruby & Ruby On Rails (http://www.codingforums.com/forumdisplay.php?f=44)
-   -   need help on ruby language (http://www.codingforums.com/showthread.php?t=273714)

xuanyinwen 09-21-2012 04:15 AM

need help on ruby language
 
Hi there, any one can help please:
I am using the following script to show a photo on my ROR page from my server,
it got a link on it, just wonder how can I delete the link


<%= if property.images[0] then link_to image_tag (property.images[0].image.url('550x412', :jpg)), user_property_image_path(user, :id => property.images[0], :property_id => property) end -%>

I try to delete the link_to part, but it stop working after change.

Thanks
Wayne

ramblex 10-22-2012 03:52 PM

So you just want to show the image? If that's the case:

Code:

<%= image_tag (property.images[0].image.url('550x412', :jpg)) if property.images[0] -%>

natesphotos 03-21-2013 04:21 PM

Thanks!
 
Thanks for the help.


All times are GMT +1. The time now is 09:48 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.