# File app/helpers/sys_conf_adm_helper.rb, line 41
  def field_type_for(field)
    type = field.type
    return type unless @types.include?(type)

    if type == :integer and field.name =~ /^(.*)_id$/ 
      begin
        ref_model = $1.pluralize.classify.constantize
        type = :catalog
      rescue NameError, NoMethodError
        # Don't panic, it is just... not a catalog. Go on.
      end
    end

    @types[type]
  end