Public Instance methods
load_typecast
()
Call the setter method for each of the model's typecast_on_load_columns with the current value, so it can be typecasted correctly.
[show source]
# File lib/sequel/plugins/typecast_on_load.rb, line 49 def load_typecast model.typecast_on_load_columns.each do |c| if v = values[c] send("#{c}=", v) end end changed_columns.clear self end
set_values
(values)
Typecast values using load_typecast when the values are retrieved from the database.
[show source]
# File lib/sequel/plugins/typecast_on_load.rb, line 61 def set_values(values) ret = super load_typecast ret end