On 21 Feb 2009, at 00:08, Craig Jolicoeur wrote:

>
> I have a rails app model that I'm getting a strange error that is just
> baffling me.  I've stripped everything out of my model down to the
> basics and still get the error.
>
> So, here is the current model:
>
>
> class Metric < ActiveRecord::Base
> end
Any plugins in that app that are extending activerecord ?

Fred
>
>
>
> When I go into the console, and issue a simple "Metric.create"  
> command I
> get the following error:
>
>>> Metric.create
> ArgumentError: wrong number of arguments (1 for 0)
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> callbacks.rb:288:in
> `callback'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> callbacks.rb:288:in
> `valid?'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> validations.rb:1008:in
> `save_without_dirty'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> dirty.rb:79:in
> `save_without_transactions'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> transactions.rb:179:in
> `send'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> transactions.rb:179:in
> `with_transaction_returning_status'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> connection_adapters/abstract/database_statements.rb:66:in
> `transaction'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> transactions.rb:129:in
> `transaction'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> transactions.rb:138:in
> `transaction'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> transactions.rb:178:in
> `with_transaction_returning_status'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> transactions.rb:146:in
> `save'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> transactions.rb:158:in
> `rollback_active_record_state!'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> transactions.rb:146:in
> `save'
>  from
> /src/parkassist/paseweb/vendor/rails/activerecord/lib/active_record/ 
> base.rb:693:in
> `create'
>  from (irb):12
>
>
> Any help?  What am I missing and why does a simple create statement
> through this ArgumentError?
> -- 
> Posted via http://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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to