Sha256: ce9e273dd120714f50b74d3be23ea706cd895279f4a06a86ef53dd7d59bcf7ff
Contents?: true
Size: 498 Bytes
Versions: 5
Compression:
Stored size: 498 Bytes
Contents
module C80Catoffers module UrlsHelper def root_url_fake '/' end def my_url_for_offer(offer) s = '' if offer.has_category? s = "#{root_url_fake}#{offer.category.slug}/#{offer.slug}" else s = "#{root_url_fake}offers/#{offer.slug}" # TODO_MY:: хардкод в урле [аналогично в routes.rb] end s end def my_url_for_category(category) "#{root_url_fake}categories/#{category.slug}" end end end
Version data entries
5 entries across 5 versions & 1 rubygems