title: Views in a has_many :through relationship
body: <p>I've been tinkering with this for some time now, and can't seem to figure this out. It's probably something simple, but here goes:</p>
  
  <p>I have a has_many :trough relationship between 'laminate', and 'standards' with a joined model 'standardization'.</p>
  
  <p><strong>Standard.rb</strong></p>
  
  <pre><code>class Standard &lt; ActiveRecord::Base
  attr_accessible :description, :name
  has_many :standardizations
  has_many :laminates, :through =&gt; :standardizations
  end
  </code></pre>
  
  <p><strong>Standardization.rb</strong></p>
  
  <pre><code>class Standardization &lt; ActiveRecord::Base
    attr_accessible :laminate_id, :standard_id
    belongs_to :laminate
    belongs_to :standard
  end
  </code></pre>
  
  <p><strong>Laminate.rb</strong></p>
  
  <pre><code>class Laminate &lt; ActiveRecord::Base
  attr_accessible :name, :standard_ids
  has_many :standardizations
  has_many :standards, :through =&gt; :standardizations
  end
  </code></pre>
  
  <p>The scenario is that laminates can belong to several standards, and I've got everything working in the new-part of the view - checkboxes and everything. My problem is when trying to display the names of the corresponding standards for a given laminate. As of now I'm able to display which standards the laminates are assigned to, but not ONLY the names of the standards.</p>
  
  <p>My show.html.erb says:</p>
  
  <pre><code>&lt;%= @laminate.standards %&gt;
  </code></pre>
  
  <p>And this returns everything correct, but saying </p>
  
  <pre><code> &lt;%= @laminate.standards.name %&gt;
  </code></pre>
  
  <p>... does not work. <strong>How on earth can I tap into the names of each individual, assigned standard?</strong></p>
  
  <p><strong>Laminate_controller:</strong></p>
  
  <pre><code>class LaminatesController &lt; ApplicationController
  # GET /laminates
  # GET /laminates.json
  def index
  @laminates = Laminate.all
  @standards = Standard.all
  
  respond_to do |format|
    format.html # index.html.erb
    format.json { render json: @laminates }
  end
  end
  
  # GET /laminates/1
  # GET /laminates/1.json
  def show
  @laminate = Laminate.find(params[:id])
  @standard = Standard.find(params[:id])
  
  respond_to do |format|
    format.html # show.html.erb
    format.json { render json: @laminate }
  end
  end
  
  # GET /laminates/new
  # GET /laminates/new.json
  def new
  @laminate = Laminate.new
  
  
  respond_to do |format|
    format.html # new.html.erb
    format.json { render json: @laminate }
  end
  end
  
  # GET /laminates/1/edit
  def edit
  @laminate = Laminate.find(params[:id])
  end
  
  # POST /laminates
  # POST /laminates.json
  def create
  @laminate = Laminate.new(params[:laminate])
  
  respond_to do |format|
    if @laminate.save
      format.html { redirect_to @laminate, notice: 'Laminate was successfully created.' }
      format.json { render json: @laminate, status: :created, location: @laminate }
    else
      format.html { render action: "new" }
      format.json { render json: @laminate.errors, status: :unprocessable_entity }
    end
    end
  end
  
  # PUT /laminates/1
  # PUT /laminates/1.json
  def update
  @laminate = Laminate.find(params[:id])
  
  respond_to do |format|
    if @laminate.update_attributes(params[:laminate])
      format.html { redirect_to @laminate, notice: 'Laminate was successfully updated.' }
      format.json { head :no_content }
    else
      format.html { render action: "edit" }
      format.json { render json: @laminate.errors, status: :unprocessable_entity }
    end
   end
  end
  
  # DELETE /laminates/1
  # DELETE /laminates/1.json
  def destroy
  @laminate = Laminate.find(params[:id])
  @laminate.destroy
  
  respond_to do |format|
    format.html { redirect_to laminates_url }
    format.json { head :no_content }
    end
   end
  end
  </code></pre>