tenderlove/rails_autolink

Cannot parse email addresses

AHaymond opened this issue · 1 comments

Getting an error when trying to send an email address to auto_link. Something as simple as auto_link('test@gmail.com') throws the following error:

wrong number of arguments (4 for 1..2)
app/controllers/application_controller.rb:90:in `method_missing'
vendor/bundle/ruby/2.0.0/gems/rails_autolink-1.1.5/lib/rails_autolink/helpers.rb:136:in `block in auto_link_email_addresses'
vendor/bundle/ruby/2.0.0/gems/rails_autolink-1.1.5/lib/rails_autolink/helpers.rb:124:in `gsub'
vendor/bundle/ruby/2.0.0/gems/rails_autolink-1.1.5/lib/rails_autolink/helpers.rb:124:in `auto_link_email_addresses'
vendor/bundle/ruby/2.0.0/gems/rails_autolink-1.1.5/lib/rails_autolink/helpers.rb:65:in `auto_link'

I am using ruby 2.0.0p353 and Rails 4.0.1

misunderstanding on my part. I was using TextHelper in a controller to return HTML via Ajax and I was not including the UrlHelper that is required for the mail_to method inside of auto_link_email_addresses.