This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
2007-11-15 00:35:29 -05:00
|
|
|
##
|
|
|
|
# This model represents a company that produces Beer.
|
|
|
|
#
|
|
|
|
class Brewery < ActiveRecord::Base
|
|
|
|
has_many :beers
|
2007-11-17 03:40:46 -05:00
|
|
|
has_one_tuxwiki_page :owner_class => 'Brewery'
|
2007-11-15 00:35:29 -05:00
|
|
|
|
2007-11-15 22:11:50 -05:00
|
|
|
##
|
|
|
|
# Returns a list of attributes to add into the Page display.
|
|
|
|
#
|
|
|
|
def page_attributes
|
|
|
|
pattr = []
|
|
|
|
pattr << "Available Beers: #{beers.size}"
|
|
|
|
pattr
|
|
|
|
end
|
2007-11-15 00:35:29 -05:00
|
|
|
end
|