lib/has_safe_dates/core_ext.rb
# Overrides #read_date when has_safe_dates is enabled for the current field the multiparameter.
# Otherwise the original #read_date method is invoked.
Overrides #read_date when has_safe_dates is enabled for the current field the multiparameter.
Otherwise the original #read_date method is invoked.
Overrides #read_date when has_safe_dates is enabled for the current field the multiparameter . Otherwise the original #read_date method is invoked .
def read_date
      if ActiveRecord::Base.has_safe_fields_config[object.class.base_class] && ActiveRecord::Base.has_safe_fields_config[object.class.base_class][:fields].include?(name)
        values.values_at(1,2,3).join("-")  
      else
        super  
      end
    end
def read_date if ActiveRecord :: Base . has_safe_fields_config [ object . class . base_class ] && ActiveRecord :: Base . has_safe_fields_config [ object . class . base_class ] [ :fields ] . include? ( name ) values . values_at ( 1 , 2 , 3 ) . join ( "-" ) else super end end
Overrides #read_date when has_safe_dates is enabled for the current field the multiparameter.
Overrides #read_date when has_safe_dates is enabled for the current field the multiparameter .
# Convert multiparameter parts into a Date string, e.g. "2011-4-23", return it, and allow CoreExt methods handle the result. # has_safe_dates is not enabled for the current field, so invoke the super method (original #read_date method).