Module: BeerDbAdmin::RoutesHelper

Defined in:
app/helpers/beer_db_admin/routes_helper.rb

Instance Method Summary collapse

Instance Method Details

#short_beer_path(beer, opts = {}) ⇒ Object



26
27
28
# File 'app/helpers/beer_db_admin/routes_helper.rb', line 26

def short_beer_path( beer, opts={} )
  short_beer_worker_path( beer.key, opts )
end

#short_brewery_path(brewery, opts = {}) ⇒ Object



22
23
24
# File 'app/helpers/beer_db_admin/routes_helper.rb', line 22

def short_brewery_path( brewery, opts={} )
  short_brewery_worker_path( brewery.key, opts )
end

#short_city_path(city, opts = {}) ⇒ Object



17
18
19
# File 'app/helpers/beer_db_admin/routes_helper.rb', line 17

def short_city_path( city, opts={} )
  short_city_worker_path( city.key, opts )
end

#short_country_path(country, opts = {}) ⇒ Object

routes for shortcuts



9
10
11
# File 'app/helpers/beer_db_admin/routes_helper.rb', line 9

def short_country_path( country, opts={} )
  short_country_worker_path( country.key, opts )
end

#short_region_path(region, opts = {}) ⇒ Object



13
14
15
# File 'app/helpers/beer_db_admin/routes_helper.rb', line 13

def short_region_path( region, opts={} )
  short_region_worker_path( "#{region.country.key}-#{region.key}", opts )
end