Now my classes look like this.
class BalanceName < ActiveRecord
def before_validation
set_blank_attributes_to_nil(@attributes)
end
end
class Balance < ActiveRecord
def before_validation
set_blank_attributes_to_nil(@attributes)
end
end
I want to inherit the activator entry in one class and I do not want to inherit this class in other classes.
I want something like this.
class CommonActiveRecord < ActiveRecord::Base
def before_validation
set_blank_attributes_to_nil(@attributes)
end
end
class BalanceName < CommonActiveRecord
def before_validation
super
end
end
class Balance < CommonActiveRecord
def before_validation
super
end
end
source
share