Class: Twig::Extension::Rails

Inherits:
Base
  • Object
show all
Defined in:
lib/twig/extension/rails.rb

Instance Method Summary collapse

Methods inherited from Base

#operators, #token_parsers

Instance Method Details

#filtersObject



6
7
8
# File 'lib/twig/extension/rails.rb', line 6

def filters
  {}
end

#helper_methodsObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/twig/extension/rails.rb', line 10

def helper_methods
  %w[
    render

    distance_of_time_in_words
    time_ago_in_words

    number_to_currency
    number_to_human
    number_to_human_size
    number_to_percentage
    number_to_phone
    number_with_delimiter
    number_with_precision

    excerpt
    pluralize
    truncate
    word_wrap

    button_to
    current_page?
    link_to
    mail_to
    url_for

    raw
    sanitize
    sanitize_css
    strip_links
    strip_tags

    audio_tag
    auto_discovery_link_tag
    favicon_link_tag
    image_tag
    javascript_include_tag
    picture_tag
    preload_link_tag
    stylesheet_link_tag
    video_tag

    escape_javascript
    javascript_tag

    benchmark
    cache
    debug

    tag
    token_list

    form_for
    form_with

    date_test
  ]
end