How to convert this php code to ruby (RoR) code? : <p>I am new in ruby on rails. I am migrating from php to ruby. Now I have some php projects which are being converted into ruby code.But How can I convert this switch code to ruby on rails 4?
function ajax($command) {</p>

<pre><code>    switch ($command) {
        case 'page_reload':
            $this-&gt;ajax_delete_entries_of_current_uid();
            break;

        case 'labchem_products':
            $this-&gt;ajax_labchem_products();
            break;

        case 'labchem_carts':
            $this-&gt;ajax_labchem_carts();
            break;

        case 'labchem_customers':
            $this-&gt;ajax_labchem_customers();
            break;

        case 'products_selected':
            $this-&gt;ajax_products_selected();
            break;

        case 'products_total':
            $this-&gt;ajax_products_total();
            break;

        case 'products_delivery_info':
            $this-&gt;ajax_products_delivery_info();
            break;

        case 'labchem_orders':
            $this-&gt;ajax_labchem_orders();
            break;

        default: break;
    }
} 
</code></pre>
