title: How to add a conditional to show in ActiveAdmin
body: <p>I have a task.
  Show a different field depends of my object parameters. </p>
  
  <p>For example for my form if message_type of current object = 'custom'
  I will show one inputs if not - another.</p>
  
  <p>Here is a code what works now: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  form do |f|
      if f.object.new_record? || f.object.message_type == 'custom'
      f.inputs do
          f.input :custom_topic
          f.input :custom_content, as: :text
        end
      f.actions
      end
    end</code></pre>
  </div>
  </div>
  </p>
  
  <p>But for show I do not know how to check it. What I have now:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>  show do
      attributes_table do
        if :message_type == 'custom'
          row :message_type
          row(:topic) { |object| object.notification_data['topic'] }
          row(:content) { |object| object.notification_data['content'] }
        else
          row :message_type
          row :notification_data
         end
      end
    end</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I run debugger it shows me </p>
  
  <p>message_type={Symbol}</p>
  
  <p>and I'm agree)</p>
  
  <p>But how to check value of message_type for current object?</p>
  
  <p>My all code bellow:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>ActiveAdmin.register Notification do
    belongs_to :case, finder: :find_by_slug
    permit_params :message_type, :custom_topic, :custom_content, :notification_data
  
    form do |f|
      if f.object.new_record? || f.object.message_type == 'custom'
      f.inputs do
          f.input :custom_topic
          f.input :custom_content, as: :text
        end
      f.actions
      end
    end
  
    show do
      attributes_table do
        if :message_type == 'custom'
          row :message_type
          row(:topic) { |object| object.notification_data['topic'] }
          row(:content) { |object| object.notification_data['content'] }
        else
          row :message_type
          row :notification_data
         end
      end
    end
  
    config.filters = false
  end</code></pre>
  </div>
  </div>
  </p>