how to use edit ajax link in controller.

Try this, Using the %{} make declaring a string over multiple lines
easer and then you can also use direct #{} substitution for the
variables which removes all the '+' and '"' characters.

@return_string += %{<tr bgcolor=white>
                      <td>#{company.street_addr}</td>
                      <td>#{company.city}</td>
                      <td>#{company.state}</td>
                      <td>#{company.pin}</td>
                      <td width=10>#{company.branch}</td>
                      <td width=10%>link_to_remote 'EDIT', :update =>
'detail', :with => "company_id=#{company.id}", :url => { :action =>
'edit_comp' }</td>
                    </tr>}

David.