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

19 lines
389 B
Ruby

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