[Rails] Re: undefined method `with_indifferent_access' for "":String
Peter p. wrote in post #1072655:
> arturo drlt wrote in post #1072587:
>
>
> ********************************************************************
> Hi arturo drlt,
>
> Try without "fields_for"
> It really works! ;-)
>
> Regards,
> Peter
> ******************************************************************
I always had troubles writing the code for this model using only
collection_select
so far i have this code:
- if comp_exist
= collection_select(:comp, :comp_emis_regs_reg_fil,
current_contribuyente.contribuyente_regs, :reg_fil, :reg_fil,
{:include_blank => false})
- else
= collection_select(:contribuyente,
:contribuyente_regs_reg_fil, current_contribuyente.contribuyente_regs,
:reg_fil, :reg_fil, {:include_blank => false}, {:class => 'reg_fil',
:name => "comp[comp_emis_regs_attributes][0][reg_fil]"})
and the first collection_select return this error
undefined method `comp_emis_regs[0].reg_fil' for #<Comp:0x7f90f655ca38>
because the method :comp_emis_regs_reg_fil its really one array and i
don't know how to specify the method for the reg_fil attribute inside
:comp_emis_regs because the relationship is has_many, some ideas?
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home