Sha256: e59744e374103926e8da14012f532c61b8b0e37260415cab78decdf2bf8995ae
Contents?: true
Size: 584 Bytes
Versions: 2
Compression:
Stored size: 584 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 => {}) text = text.html_safe unless text.html_safe? Rinku.auto_link(text.html_safe, 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.4.1 | lib/rails_rinku.rb |
rinku-1.4.0 | lib/rails_rinku.rb |