On Aug 5, 3:10 pm, Sam Ward <[email protected]> wrote: > The plot thickens.... > > Thank you guys for you help and how quickly you got back to me. I have > now carefully searched and replaced "Transaction" with "Loan" throughout > my project and, believe it or not, I still have the same error!! > > The Rails Gods are harsh masters. > > Any other ideas? Have I broken something? I am totally flummoxed. >
It's calling to_s on something, trying to pass it the argument :db (rails extends to_s on time and a few other classes), but the object in question obviously isn't expecting to have to_s called on it in that way. I'd stick a breakpoint in there to see what exactly rails is calling to_s on (but at a guess it could be because you're supplying something that isn't a time or a date somehere where rails is expecting one) Fred > Rapidly Balding Sam > > Here's my stack trace for good measure: > ArgumentError in LoansController#create > > wrong number of arguments (1 for 0) > RAILS_ROOT: /Users/sam/Sites/myunibox > > Application Trace | Framework Trace | Full Trace > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/connecti > on_adapters/abstract/quoting.rb:61:in > `to_s' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/connecti > on_adapters/abstract/quoting.rb:61:in > `quoted_date' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/connecti > on_adapters/abstract/quoting.rb:29:in > `quote' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/connecti > on_adapters/mysql_adapter.rb:236:in > `quote' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb: > 3033:in > `attributes_with_quotes' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb: > 3024:in > `each' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb: > 3024:in > `attributes_with_quotes' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb: > 2939:in > `create_without_timestamps' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/timestam > p.rb:53:in > `create_without_callbacks' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/callback > s.rb:266:in > `create' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb: > 2915:in > `create_or_update_without_callbacks' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/callback > s.rb:250:in > `create_or_update' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb: > 2573:in > `save_without_validation' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/validati > ons.rb:1090:in > `save_without_dirty' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/dirty.rb > :79:in > `save_without_transactions' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/transact > ions.rb:229:in > `send' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/transact > ions.rb:229:in > `with_transaction_returning_status' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/connecti > on_adapters/abstract/database_statements.rb:136:in > `transaction' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/transact > ions.rb:182:in > `transaction' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/transact > ions.rb:228:in > `with_transaction_returning_status' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/transact > ions.rb:196:in > `save' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/transact > ions.rb:208:in > `rollback_active_record_state!' > /Users/sam/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/transact > ions.rb:196:in > `save' > /Users/sam/Sites/boxapp/app/controllers/loans_controller.rb:36:in > `create' > -- > Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

