I can offer the following "ugly" workaround using custom create method
(I think you need also to install ruby-plsql gem even if you are not
using PL/SQL calls because otherwise custom create method will not
work in oracle_enhanced):
<pre>
class Example < ActiveRecord::Base
set_table_name "exa_example_table"
set_create_method do
conn = connection.raw_connection
cursor = conn.parse <<-EOS
BEGIN
INSERT INTO exa_example_table (column_a, column_b) VALUES
(:column_a, :column_b)
RETURNING id INTO :id;
END;
EOS
cursor.bind_param(':column_a', column_a)
cursor.bind_param(':column_b', column_b)
cursor.bind_param(':id', nil, Integer)
cursor.exec
id = cursor[':id']
cursor.close
id
end
end
</pre>
In this way you can override the way how to create record in database.
And this will also assign ID column value to created Ruby object.
Raimonds