文章列表
环境:
rails 1.2.6 mysql 5
测试数据表:
table:infos
fields:
id ,bigint(20), AUTO_INCREMENT =90000000013
name,varchar(255)
代码
info_controllor.rb
def add
@info = Info.new
@info.name = "ddd111"
@info.save!
puts "id:",@info.id.to_s
end
run...
id:-1943132 ...