On Mar 13, 11:42 am, Erwin yves_duf...@mac.com wrote:
In the controller , I am passing an Array as a collection
@objects = [item1, item2, item3, item4]
in the view I wrote
%table#objects
= render :partial = 'object', :collection = @objects
and in my partial _object.html
=
Thanks fred.. I tried with object but same error.. it seems
model_name_from_record_or_class is needed when using collection
I may have to change the partial rendering ... ?
-- trace
activemodel (3.0.4) lib/active_model/naming.rb:94:in
`model_name_from_record_or_class'
activemodel (3.0.4)
to avoid being confused with 'object' litteral .. I modified the test
code as following :
#lockers
%table#items
= render :partial = 'item', :collection = ['foo', 'bar',
'baz']
and the _item partial
= content_tag_for(:tr, item) do
%td= item
this time , the
On Mar 13, 1:28 pm, Erwin yves_duf...@mac.com wrote:
to avoid being confused with 'object' litteral .. I modified the test
code as following :
#lockers
%table#items
= render :partial = 'item', :collection = ['foo', 'bar',
'baz']
and the _item partial
=
thanks you confirm it .. I noticed it as I change my test code using
the array as the collection
it's fine now ... using content_tag obvious thing doesn't appears at
first glance !!
On 13 mar, 15:12, Frederick Cheung frederick.che...@gmail.com wrote:
On Mar 13, 1:28 pm, Erwin
5 matches
Mail list logo