title: Rails: Active Admin Association Image column
body: <p>I am new to ruby on rails and have just installed active admin and was trying to customize the </p>
  
  <p>views.</p>
  
  <p>I have a product and image table. Each image belongs to one product.</p>
  
  <p>Now I want to display a column with the associated image when showing the products page.</p>
  
  <p>At the moment it´s only the image_url text which isn´t working. Later on I would like do</p>
  
  <p>have the picture displayed in 50x50px.</p>
  
  <p>How to I do this? (image model: name:string image_url:text)</p>
  
  <p>Here is what I have done :</p>
  
  <pre><code>ActiveAdmin.register Product do
  
  index do
      column "Image" do |image|
          image.image_url
      end
      column :name
      column :preview_text
      column :full_text
      column :price, :sortable =&gt; :price do |product|
        div :class =&gt; "price" do
            number_to_currency product.price
       end
      end
   default_actions
   end
  end
  </code></pre>
  
  <p>I dont know how to fix that part with " do image. I am a beginner in rails 2 days exp..</p>
  
  <p>It seems the syntax is wrong and throwing error:</p>
  
  <pre><code>undefined method `image_url' for #&lt;Product:0x00000101b5a458&gt;
  </code></pre>
  
  <p>Thanks</p>