Closed AlexCppns closed 2 years ago
I just ran into this also. It turns out I was using this in the model. This is apparently only a view helper, so it wouldn't work. Perhaps you're doing something similar?
Yeah, this is mixed into the view helpers. https://github.com/tenderlove/rails_autolink/blob/master/lib/rails_autolink/helpers.rb#L9-L11
Yeah. I just used the Sanitize gem in the model to remove any extra html tags I didn't want, then used this in the view.
In serializers you can use ActionController::Base.helpers.auto_link(text)
undefined method
auto_link' for #<CampaignSerializer:..`