search for: instance_method_for_acl

Displaying 1 result from an estimated 1 matches for "instance_method_for_acl".

2006 Jul 20
0
Refactoring common code to module
...of the associations. module GACL class AclSection < ActiveRecord::Base set_table_name "gacl_acl_sections" has_many :acls, :dependent => true validates_presence_of :name, :value validates_numericality_of :order_value validates_uniqueness_of :value def instance_method_for_acl (would be the same functionality for the others, too) ... acls.each do |acl| ... end end end end Is it possible to do some refactoring, so I only have to define my code once and the method names get used from some parameter or extracted from the class name? Best reg...