nosretep
2012-Feb-26 23:10 UTC
Getting ArgumentError calling initialize with ActiveResource 3.2.1
instantiate_record calls new, and new implicitly calls initialize (unless I''m not understanding the mystery) In base.rb def instantiate_record(record, prefix_options = {}) new(record, true).tap do |resource| resource.prefix_options = prefix_options end end As it''s written get an ArgumentError as this calls new(record, true). If I change the code in base.rb to the following: def instantiate_record(record, prefix_options = {}) new(record).tap do |resource| resource.prefix_options = prefix_options end end I no longer get the ArgumentError. Is this a known issue? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.