title: question mark after variable/object name in rails
body: <p>I'm very new to ruby on rails. Thanks for your patience in advance. </p>
  
  <pre><code>&lt;div class="field"&gt;
      &lt;%= @pin.image_url if @pin.image? %&gt;
      &lt;%= f.file_field :image %&gt;
      &lt;%= f.hidden_field :image_cache %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <ol>
  <li><p>What does <code>@pin.image?</code>  do?
  There is not image? method in my controller. I'm guessing it's one of the helper functions provided by rails for every controller? Is that right? </p></li>
  <li><p>What is f ?  </p></li>
  </ol>
  
  <p>here is my model for pin </p>
  
  <pre><code>class Pin &lt; ActiveRecord::Base
      extend FriendlyId
      friendly_id :name, use: :slugged    
      belongs_to :board
  end
  </code></pre>
  
  <p>and its schema </p>
  
  <pre><code>class CreatePins &lt; ActiveRecord::Migration
    def change
      create_table :pins do |t|
        t.string :name
        t.string :image
        t.integer :board_id
  
        t.timestamps null: false
      end
    end
  end
  
  class AddImageToPins &lt; ActiveRecord::Migration
    def change
      add_column :pins, :image, :string
    end
  end
  </code></pre>