I just noticed this behavior.
delete '/admin/rules/:id' do |id|
@rule = Rule.find(:id=>id)
Results in the following SQL:
I, [2012-07-17T10:34:21.410492 #9394] INFO -- : (0.083014s) SELECT * FROM (SELECT * FROM "NM_REQUESTS" WHERE ("ID" = 14)) "T1" WHERE (ROWNUM <= 1)
I, [2012-07-17T10:34:21.413837 #9394] INFO -- : (0.000003s) Transaction.begin
I, [2012-07-17T10:34:21.496202 #9394] INFO -- : (0.081909s) DELETE FROM "NM_REQUESTS" WHERE ("ID" = 14.0)
I, [2012-07-17T10:34:21.577711 #9394] INFO -- : (0.081328s) Transaction.commit
Specifically pointing out that the ID is 14.0. Seems this value should be cast to an Integer in the SQL query. I have not looked at the source to confirm solution, but thought I'd mention it here as a minor issue.
Does this cause any problems? The underlying issue is that Oracle does not have an integer type, only a number type. Automatically casting to integer would break things if the primary key was a varchar field, for example. You could probably use the typecast_on_load plugin to automatically cast the primary key to integer (assuming Rule.db_schema[:id][:type] is :integer) if you really want it casted to an integer, or do:
if v = super
No problems caused by this -- this was mainly informational to make you aware.