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/models/brewery.rb

17 lines
339 B
Ruby

##
# This model represents a company that produces Beer.
#
class Brewery < ActiveRecord::Base
has_many :beers
has_one_tuxwiki_page :owner_class => 'Brewery'
##
# Returns a list of attributes to add into the Page display.
#
def page_attributes
pattr = []
pattr << "Available Beers: #{beers.size}"
pattr
end
end