Displaying 1 result from an estimated 1 matches for "image_url_small".
2008 Jul 19
5
helper functions permanently altering variables
...rip! # ohh la la
str.downcase! #
str.gsub!(/\ +/, ''-'') # spaces to dashes, preferred separator char
everywhere
end
-- view showing the books
book.product_name
#returns "a name with a lot of spaces and characters in it"
link_to(image_tag(book.image_url_small), :controller => "book", :action
=> "detail", :book_url => format_url(book.product_name), :key =>
book.isbn)
book.product_name
#returns "a-name-with-a-lot-of-spaces-and-characters-in-it"
so the problem is I want a function that formats just the path, but...