title: Ruby on Rails: Using default value, when the variable is null or empty
body: <p>I have this code-snippet in html erb.</p>
  
  <p>For some objects the cover_image_url is empty, how do i modify this code block to use a default value ,when that property is null or empty?</p>
  
  <pre><code>&lt;%@books.each do |book|%&gt;
          $('#bookContainer').append('&lt;div class="conn"&gt;&lt;p&gt;&lt;img class="floatright" src="&lt;%= h book.cover_image_url%&gt;"&gt;&lt;h3&gt;&lt;%= h book.title%&gt;&lt;/h3&gt;&lt;h3&gt;&lt;%= h book.author%&gt;&lt;/h3&gt;&lt;/p&gt;&lt;/div&gt;');
      &lt;% end %&gt;
  </code></pre>