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/breweries_helper.rb

17 lines
450 B
Ruby
Raw Normal View History

module BreweriesHelper
def new_brewery_link
link_to 'New Brewery', new_brewery_path,
{ :title => 'Create a new brewery' }
end
def show_brewery_link(brewery)
link_to brewery.title, brewery_path(brewery.page.title_for_url),
{ :title => brewery.title }
end
def edit_brewery_link(brewery)
link_to 'Edit Brewery', edit_brewery_path(brewery.page.title_for_url),
{ :title => "Edit #{brewery.title}" }
end
end