2013-04-24 1 views
0

에서 개체를 보내 브라우저에서 내 쇼 동작을 열면 내 도우미가 @exchanger 객체를 보냈습니다. 모두 괜찮습니다. 그러나! 내가 index 액션을 호출 할 때 내가 얻을 : 내가 @exchanger 객체를 도우미 인덱스 rabl보기를 사용하는 경우 모든 괜찮 데이터레일 RABL 도우미 나는 그런 index.rabl이 인덱스보기

Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id 

...

어떻게 보내?

답변

0

ㅎ) 에 의해-자신의 찾기, 공유 :

내가해야 모두 작성했다 : root_object

object @exchanger 
attributes :id, :name, :address, :location_id, :latitude, :longitude, :exchanger_type_id 
node(:location_name) {|exchanger_list| exchanger_list.location.name } 
node(:exchanger_type_name) {"normal" } 
child currencies(root_object) do 
    attribute :value, :direction_of_exchange_id, :exchanger_list_id 
end