title: Putting presentation logic in controller is a good practice in Ruby?
body: <p>Some recommendation [1] suggest you to use</p>
  
  <pre><code>&lt;%= current_user.welcome_message %&gt;
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>&lt;% if current_user.admin? %&gt;
    &lt;%= current_user.admin_welcome_message %&gt;
  &lt;% else %&gt;
    &lt;%= current_user.user_welcome_message %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>But the problem is you must have the decision logic somewhere in your code. </p>
  
  <p>My understanding is putting the decision in <code>template</code> is better than <code>controller</code> as it make your controller more clean. Is it correct?</p>
  
  <p>Are there better way to handle this?</p>
  
  <p><a href="http://robots.thoughtbot.com/post/27572137956/tell-dont-ask" rel="nofollow noreferrer">http://robots.thoughtbot.com/post/27572137956/tell-dont-ask</a></p>