2014-12-02 2 views
3

activeadmin과 paperclip을 사용하여 이미지를 업로드하고 있습니다.레일을 사용할 때 클래스 정보를 숨기는 방법 activeadmin

camp.rb (ActiveAdmin을 파일)

f.input :photo1, :as => :file, :label => 'Foto1', :hint => f.template.image_tag(f.object.photo1.url(:small)) 

모든 확인을 작동하지만, 나는

<ol>#<#<Class:0x007fcf21d8dc48>:0x007fcf22f38f60> 
    <li class="file input optional" id="camp_photo1_input"> 
    <label class="label" for="camp_photo1">Foto1</label> 
    <input id="camp_photo1" name="camp[photo1]" type="file"> 
    <p class="inline-hints"> 
     <img alt="Unium" src="/assets/camps/1/small/unium.jpg?1417540812"> 
    </p> 
    </li> 
</ol> 

방법 # < # 숨길 클래스 정보를 참조하십시오 0x007fcf22f38f60를>? 도와 주셔서 감사합니다!

+0

전체 양식 블록으로 질문을 업데이트 할 수 있습니까? – nistvan

답변

5
f.input :photo1, :as => :file, :label => 'Foto1', :hint => image_tag(f.object.photo1.url(:small)) 
+0

그것은 작동합니다! 감사!!! – yaartem