Module: C80Catoffers::UrlsHelper

Defined in:
app/helpers/c80_catoffers/urls_helper.rb

Instance Method Summary collapse

Instance Method Details

#my_url_for_category(category) ⇒ Object



21
22
23
# File 'app/helpers/c80_catoffers/urls_helper.rb', line 21

def my_url_for_category(category)
  "#{root_url_fake}categories/#{category.slug}"
end

#my_url_for_offer(offer) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/helpers/c80_catoffers/urls_helper.rb', line 8

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

#root_url_fakeObject



4
5
6
# File 'app/helpers/c80_catoffers/urls_helper.rb', line 4

def root_url_fake
  '/'
end