Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您如何获得 rails 中新创建的行的 id?
例如,
Session.create(:user_id => user_id, :email => email )
我希望有更多关于 Rails 的文档......哦,好吧,为了未来
session = Session.create(:user_id => user_id, :email => email ) puts session.id