title: Rescuing Exception within Ruby Interpolation in a HAML Document
body: <p>I have a bit of interpolated ruby code in a HAML document that looks like the following:</p>
  
  <pre><code>:javascript
      a = { 'something' : "#{model.attribute.present? ? method(parameter) : ''}" }
  </code></pre>
  
  <p>However, the method(parameter) is throwing exceptions with some parameters, so I would like to rescue the exception. When the exception is thrown, I would like the 'something' key to be mapped to something else.</p>
  
  <p>I am not clear on the exact syntax of how to do this with the HAML code/ruby interpolation. I've tried a couple things, but it's not working.</p>
  
  <p>Thanks!</p>