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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 28, '12 at 11:33a
activeFeb 28, '12 at 11:33a
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Nosretep: 1 post

People

Translate

site design / logo © 2022 Grokbase