This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
barleysodas/app/helpers/beers_helper.rb

16 lines
392 B
Ruby

module BeersHelper
def new_beer_link
link_to 'New Beer', new_beer_path, { :title => 'Create a new beer' }
end
def show_beer_link(beer)
link_to beer.title, beer_path(beer.page.title_for_url),
{ :title => beer.title }
end
def edit_beer_link(beer)
link_to 'Edit Beer', edit_beer_path(beer.page.title_for_url),
{ :title => "Edit #{beer.title}" }
end
end