Skip to navigation
How to check if an image exist on rails?
07.12.13
i add this helper function def image_check(img,options) if FileTest.exists?("#{RAILS_ROOT}/public/images/#{img}") image_check = image_tag("#{img}",options) else image_check = image_tag("products/noimg.gif", options) end end
Reply
Anonymous
How to check if a image exist on rails?
i add this helper function def image_check(img,options) if FileTest.exists?("#{RAILS_ROOT}/public/images/#{img}") image_check = image_tag("#{img}",options) else image_check = image_tag("products/noimg.gif", options) end end
07.12.13
Reply
Anonymous
Information Epoch 1734863239
Don't force yourself or others to reimplement functionality.
Home
Notebook
Contact us