Flowdock
method

default_value

Importance_0
v1.2.6 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters::OpenBaseAdapter
default_value(value) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/openbase_adapter.rb, line 250
        def default_value(value)
          # Boolean type values
          return true if value =~ /true/
          return false if value =~ /false/
 
          # Date / Time magic values
          return Time.now.to_s if value =~ /^now\(\)/i
 
          # Empty strings should be set to null
          return nil if value.empty?
          
          # Otherwise return what we got from OpenBase
          # and hope for the best...
          return value
        end
Register or log in to add new notes.