Skip to content

Commit 925eb0c

Browse files
authored
Support Rails 6.0
DEPRECATION WARNING: Single arity template handlers are deprecated. Template handlers must now accept two parameters, the view object and the source for the view object. Change: >> Typescript::Rails::TemplateHandler.call(template) To: >> Typescript::Rails::TemplateHandler.call(template, source) (called from <top (required)> at /home/coderhs/work/senitron/athena_senitron_cloud/config/application.rb:20)
1 parent 56ff7aa commit 925eb0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/typescript/rails/template_handler.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ def erb_handler
66
@erb_handler ||= ActionView::Template.registered_template_handler(:erb)
77
end
88

9-
def call(template)
10-
compiled_source = erb_handler.call(template)
9+
def call(template, source)
10+
compiled_source = erb_handler.call(template, source)
1111
path = template.identifier.gsub(/['\\]/, '\\\\\&') # "'" => "\\'", '\\' => '\\\\'
1212
<<-EOS
1313
::Typescript::Rails::Compiler.compile('#{path}', (begin;#{compiled_source};end))

0 commit comments

Comments
 (0)