Add additional columns to typecast on load for this model.
# File lib/sequel/plugins/typecast_on_load.rb, line 35 def add_typecast_on_load_columns(*columns) @typecast_on_load_columns.concat(columns) end
Give the subclass a copy of the typecast on load columns.
# File lib/sequel/plugins/typecast_on_load.rb, line 40 def inherited(subclass) super subclass.instance_variable_set(:@typecast_on_load_columns, typecast_on_load_columns.dup) end
Call the setter method for each of the typecast on load columns, ensuring the model object will have the correct typecasting even if the database doesn’t typecast the columns correctly.
# File lib/sequel/plugins/typecast_on_load.rb, line 48 def load(values) super.load_typecast end
Generated with the Darkfish Rdoc Generator 2.