Gabe H. wrote:
> Daniel Talsky wrote:
>> Aaron Pfeifer wrote:
>>> Could it be because you have a "type" column in your models which
>>> you're either validating on or accessing?  If so, this could help:
>>> 
>>> http://wiki.pluginaweek.org/Type_attributes
>>> 
>>> On Sep 28, 4:12 pm, Daniel Talsky <[EMAIL PROTECTED]>
>> 
>> There's a few attributes WITH type in the name "question_type", but none 
>> actually CALLED "type".  Would that still do it?  Any other ideas?
> 
> Daniel, did you ever find an answer to this one? I'm getting exactly the 
> same behavior.  I have attributes with "type" in the name, but none 
> exactly named "type".

I encountered a similar problem when calling :type on an instance that 
(misbehaved and) overrode :type (Mysqlcolumn in this instance). I was 
seeing the above error message when I had a nil object and was still 
sending type (hence, Object#type handled). The fix was something like:

Before:

find_column(:attribute).type

After:

find_column(:attribute).type if find_column(:attribute)

-- 
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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to