I wrote an article the other day stating that I had no idea why someone would call a Helper method from inside a Controller in Rails.
I just found a reason. Here is what I needed to do:
From inside my controller, I wanted to be able to generate some AJAX code that would be sent back to the page. In other words, I needed to generate some HTML (for an AJAX reply) that would be able to make a remote call and the best way to do this is through the link_to_remote() function.
Here is the code I added to my Controller in order to be able to achieve this:
class ConciliationsController {:action => "reconcile", :transaction_id => @transaction.id} )
end
end
end
Cheers!