I'm trying to pass association values as hidden field in simple form
so same functionality like when you do ...
= simple form for @document do |f|
= f.association :clients
...but will generate hidden field insted
I'm trying to do it as this
= f.association :clients, as: hidden
but that wont work obviously
only thing that works for me is
%input{ name: 'document[client_ids][]', value: '1'}
%input{ name: 'document[client_ids][]', value: '2'}
%input{ name: 'document[client_ids][]', value: '3'}
= f.association :clients, type: 'hidden'
?