diff --git a/lib/rbs_rails/active_record.rb b/lib/rbs_rails/active_record.rb index a1e8509..70d55e6 100644 --- a/lib/rbs_rails/active_record.rb +++ b/lib/rbs_rails/active_record.rb @@ -496,6 +496,8 @@ def authenticate_#{attribute}: (String) -> (#{klass_name} | false) mod_sig = +"module GeneratedAttributeMethods\n" mod_sig << klass.columns.map do |col| col_serializer = klass.attribute_types[col.name].try(:coder) + puts 'Checking... ' + col.name.to_s + puts ' → found ' + col_serializer.inspect # e.g. ActiveRecord::Coders::JSON # if your model has `serialize ..., JSON` # e.g. # @@ -515,6 +517,7 @@ def authenticate_#{attribute}: (String) -> (#{klass_name} | false) sql_type_to_class(col.type) end end + puts '[chose ' + class_name + ']' class_name_opt = optional(class_name) # If the DB says the column can be null, we need `?` # ...but if the type is already `untyped` there's no point in writing `untyped?`