Hi all,
Ruby 1.8.4
Rails 1.1
OCI8 0.1.14
I think I’m hitting an issue with ActiveRecord::Base#save and the Oracle
adapter. Line 158 in the schedules_controller.rb file is simply:
158: if @schedule.save
159: flash[:notice] = ‘Schedule was successfully created.’
160: redirect_to :action => ‘list’
161: else
162: render :action => ‘new’
163: end
Here’s the error (which is the same as what’s in the dev log):
ArgumentError in Schedules#create
wrong number of arguments (1 for 0)
/opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/oracle_adapter.rb:53:in
attributes_with_quotes_pre_oracle' /opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/oracle_adapter.rb:53:in
attributes_with_quotes’
/opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:2031:in
quoted_column_names' /opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1735:in
create_without_callbacks’
/opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/callbacks.rb:261:in
create_without_timestamps' /opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/timestamp.rb:30:in
create’
/opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1712:in
create_or_update_without_callbacks' /opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/callbacks.rb:249:in
create_or_update’
/opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1388:in
save_without_validation' /opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/validations.rb:724:in
save_without_transactions’
/opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/transactions.rb:126:in
save' /opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/connection_adapters/abstract/database_statements.rb:51:in
transaction’
/opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/transactions.rb:91:in
transaction' /opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/transactions.rb:118:in
transaction’
/opt/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/transactions.rb:126:in
save' #{RAILS_ROOT}/app/controllers/schedules_controller.rb:158:in
create’
Parameters: {“commit”=>“Create”, “schedule”=>{“start_date_id”=>“30”,
“clli_code”=>“TEST”, “slot_id”=>“1”, “hardware_id”=>“6”,
“state_id”=>“6”}}
Headers: {“cookie”=>[], “Cache-Control”=>“no-cache”}
Any ideas?
Thanks,
Dan