Michael Yao
unread,Nov 7, 2011, 5:17:18 PM11/7/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Composite Keys for ActiveRecord
hi,
I am new in RoR. I am trying to use composite_primary_key gem.
However, when i try to create a model object, i got following error:
NoMethodError: undefined method `match' for nil:NilClass
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1/
lib/active_support/whiny_nil.rb:48:in `method_missing'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/
composite_primary_keys-4.1.1/lib/composite_primary_keys/
attribute_methods/read.rb:11:in `define_read_method'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.1.1/
lib/active_record/attribute_methods/read.rb:48:in
`define_method_attribute'
after i traced in, i noticed that column.type_cast_code('v') returns
null.
My question: What does the 'v" mean over here? I searched through web,
and can not find anywhere explain what are we trying to do using 'v'
as parameter.
any hint is appreciated.
Thanks
Michael Yao