title: Rails form: get object method by string
body: <p>I'm trying to create a dynamic form where I get the object methods by a String from the columns list.</p>
  
  <p>In my view I have the following code:</p>
  
  <pre><code>  &lt;% Contact.columns.each do |column| %&gt;
        &lt;% if column.name.in? ["id", *Contact.accessible_attributes] %&gt;
            &lt;%= f.select column.name, options_for_select(@contacts.first.keys, :include_blank =&gt; :true) %&gt;
        &lt;%end%&gt;
      &lt;%end%&gt;
  </code></pre>
  
  <p>This will give me errors, so I would like how can I bind a String to an method in a view.</p>
  
  <pre><code>undefined method `id' for #&lt;ContactImport:0x00000003686598&gt;
  </code></pre>