Any similar to mysql_insert_id (PHP) in RoR

Once you save @object, just use @object.id.

Yes, it is the id provided by MySQL. Assuming you have the relationship between company and users in your models, you can also do something like this:

@company = Company.create(params[:company])
params[:users].each do |user|
   @company.users.create(user)
end