Module: Liquid::Rails::UrlFilter

Defined in:
lib/liquid4-rails/filters/url_filter.rb

Instance Method Summary collapse

Instance Method Details

#current_page?(path) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/liquid4-rails/filters/url_filter.rb', line 17

def current_page?(path)
  @context.registers[:view].current_page?(path.to_s)
end


5
6
7
# File 'lib/liquid4-rails/filters/url_filter.rb', line 5

def link_to(name, url, options={})
  @context.registers[:view].link_to(name, url.to_s, options)
end


9
10
11
# File 'lib/liquid4-rails/filters/url_filter.rb', line 9

def link_to_unless_current(name, url, options={})
  @context.registers[:view].link_to_unless_current(name, url.to_s, options)
end

#mail_to(email_address, name = nil, options = {}) ⇒ Object



13
14
15
# File 'lib/liquid4-rails/filters/url_filter.rb', line 13

def mail_to(email_address, name=nil, options={})
  @context.registers[:view].mail_to(email_address, name, options)
end