lib/gumdrop/util/view_helpers.rb in gumdrop-1.0.3 vs lib/gumdrop/util/view_helpers.rb in gumdrop-1.1.0
- old
+ new
@@ -4,9 +4,14 @@
module ViewHelpers
def hidden(&block)
#no-op
end
+
+ def urlencode(string)
+ require "erb" unless defined? ERB
+ ERB::Util.url_encode(string)
+ end
def markdown(source)
eng_class= Gumdrop::Renderer.for 'markdown'
unless eng_class.nil?
eng= eng_class.new { source }