Displaying 1 result from an estimated 1 matches for "serviceprovidertype1controller".
2006 Feb 27
1
Models and Inheritance
...f OOP I assumed that there should be
a series of Serviceprovider child objects of the company class.
Company < ActiveRecord::Base
has_belongs_to_many :services
end
Serviceprovidertype1 < Company
Serviceprovidertype2 < Company
These child classes have corresponding child controllers
Serviceprovidertype1Controller < CompanyController
in the parent I have a method
protected
list_by_service(service)
Company.find_by_sql(.. + service + ...)
end
and in the child Serviceprovidertype1Controller
list
list_by_service(''Servicetype'')
end
but it only seems to work if I make the method in th...