かんたんフォーム関連付けでギフトに画像を表示したい
を使用してこのコードを試しましlabel_method
たが、機能しません:
<%=f.association :gift, :collection=> Gift.all, :label_method=>lambda { |gift| "#{gift.name} #{image_tag 'gift.photo.url(:small)'}" }, :value_method=> :id, :as=>:radio_buttons%>
かんたんフォーム関連付けでギフトに画像を表示したい
を使用してこのコードを試しましlabel_method
たが、機能しません:
<%=f.association :gift, :collection=> Gift.all, :label_method=>lambda { |gift| "#{gift.name} #{image_tag 'gift.photo.url(:small)'}" }, :value_method=> :id, :as=>:radio_buttons%>