'How to use auto_link inside of a controller

In my controller I need to build a JSON object. How can I use auto_link() inside my controller? Right now it errors:

NoMethodError (undefined method `mail_to' for #<ConversationsController:0x144c3f880>):
  app/helpers/application_helper.rb:48:in `html_format'
  app/controllers/conversations_controller.rb:326:in `comments'
  app/controllers/conversations_controller.rb:322:in `comments'

Thank you for any ideas



Solution 1:[1]

Currently, the auto_link function is removed from rails 3.1 you can use the rails_autolink gem instead. https://github.com/tenderlove/rails_autolink

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Magho