Sha256: bb91a452d279f0700ecd8e7f6eb95527ec09a0d29d6e2e773430a90c7fc49d27
Contents?: true
Size: 525 Bytes
Versions: 2
Compression:
Stored size: 525 Bytes
Contents
require 'rinku' module RailsRinku def rinku_auto_link(text, *args, &block) return '' if text.blank? options = args.size == 2 ? {} : args.extract_options! unless args.empty? options[:link] = args[0] || :all options[:html] = args[1] || {} end options.reverse_merge!(:link => :all, :html => {}) Rinku.auto_link(text, options[:link], tag_options(options[:html]), &block) end end module ActionView::Helpers::TextHelper include RailsRinku alias_method :auto_link, :rinku_auto_link end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rinku-1.3.1 | lib/rails_rinku.rb |
rinku-1.3.0 | lib/rails_rinku.rb |