UPDATE
code:
collection_select(:comp, :comp_emi_reg_ids, CompEmiReg.where("comp_id =
?", @comp.id), :id, :reg_fil, {:include_blank => false})
return this error
NoMethodError (undefined method `with_indifferent_access' for
"":String):
and this code:
collection_select(:comp, :comp_emi_reg_ids, CompEmiReg.where("comp_id =
?", @comp.id), :reg_fil, :regi_fil, {:include_blank => false})
return this error:
ActiveRecord::RecordNotFound (Couldn't find CompEmiReg with ID=0):
I tried to do this
collection_select(:comp, :comp_emi_reg_regs_fils,
CompEmiReg.where("comp_id = ?", @comp.id), :reg_fil, :regi_fil,
{:include_blank => false})
but it don't wokrs it returns:
NoMethodError: undefined method `comp_emi_reg_regs_fils' for
#<Comp:0x7ffd398b58d8>
it seems that in the param of method for collection I only can send the
attribute id in plural other fields just return NoMethodError, I don't
know what I'm doing wrong at the end always end up with NoMethodError
(undefined method `with_indifferent_access' for "":String):
somebody knows another way to do this or knows if in the param method it
only can receive ids for this kind of relationship?
--
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 https://groups.google.com/groups/opt_out.