Sha256: daa7550e750cf53d0dcee3fb1de8323300d675528cc08e686789f41d3786fa5f
Contents?: true
Size: 634 Bytes
Versions: 3
Compression:
Stored size: 634 Bytes
Contents
module Liquid module Rails module UrlFilter def link_to(name, url, options={}) @context.registers[:view].link_to(name, url.to_s, options) end def link_to_unless_current(name, url, options={}) @context.registers[:view].link_to_unless_current(name, url.to_s, options) end def mail_to(email_address, name=nil, options={}) @context.registers[:view].mail_to(email_address, name, options) end def current_page?(path) @context.registers[:view].current_page?(path.to_s) end end end end Liquid::Template.register_filter(Liquid::Rails::UrlFilter)
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
liquid-rails-0.2.0 | lib/liquid-rails/filters/url_filter.rb |
liquid-rails-0.2.0.beta1 | lib/liquid-rails/filters/url_filter.rb |
liquid-rails-0.1.4 | lib/liquid-rails/filters/url_filter.rb |