On Wednesday, May 14, 2014 8:42:50 AM UTC-7, Robert Sosinski wrote: > > Ok, that makes sense, sounds like I should peruse the release notes; just > to see what else has changed. >
Always a good idea. :) > To my other question, where would the "raw" data be stored if not in the > values hash? I'm just interested where the "true" value is coming from in > the newly instantiated company. > There is a class-level default_values hash that stores the default values. You can actually manipulate this directly if you want to use a different default value than the database (or use a default where the database does not have one). The defaults_setter plugin overrides Model#[] so that for new objects where a value for the column has not already been set, it returns the entry in the class's default_values. The plugin itself is fairly small, don't be afraid to dive in and read the source. :) https://github.com/jeremyevans/sequel/blob/master/lib/sequel/plugins/defaults_setter.rb Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
