Closed meandkareem closed 7 years ago
Same here. Rails 3.2.2, Rinku 1.7.
Looks like tag_options
changed in Rails 3.2 to always expect a hash. The following should work:
auto_link('hello www.google.com', :all, :target => '_blank')
Not sure if we should update the docs to refer to the new syntax.
Great. Works like charm. Thanks a lot.
Yes please to updating the documentation.
Again, please update the documentation
The docs refer to the base Rinku usage, which has not changed:
>> gem 'rinku', '2.0.1'
=> true
>> require 'rinku'
=> true
>> Rinku.auto_link('http://www.pokemon.com', :all, 'target="_blank"')
=> "<a href=\"http://www.pokemon.com\" target=\"_blank\">http://www.pokemon.com</a>"
They also note that the monkey-patched Rails method mimics the original (i.e. per the Rails docs). I'll add a note to the README with a Rails specific example so this is harder to mistake.
undefined method `each_pair' for "target='_blank'":String
on rails 3.2.5