Directly include "CompiledTemplates" module
We always want to include this module. It'll be used in production (maybe)
This commit is contained in:
parent
8611b15924
commit
195f39804a
|
@ -10,6 +10,10 @@ require "action_view/template"
|
|||
require "action_view/lookup_context"
|
||||
|
||||
module ActionView #:nodoc:
|
||||
module CompiledTemplates #:nodoc:
|
||||
# holds compiled template code
|
||||
end
|
||||
|
||||
# = Action View Base
|
||||
#
|
||||
# Action View templates can be written in several ways.
|
||||
|
@ -141,6 +145,8 @@ module ActionView #:nodoc:
|
|||
class Base
|
||||
include Helpers, ::ERB::Util, Context
|
||||
|
||||
include CompiledTemplates
|
||||
|
||||
# Specify the proc used to decorate input tags that refer to attributes with errors.
|
||||
cattr_accessor :field_error_proc, default: Proc.new { |html_tag, instance| "<div class=\"field_with_errors\">#{html_tag}</div>".html_safe }
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionView
|
||||
module CompiledTemplates #:nodoc:
|
||||
# holds compiled template code
|
||||
end
|
||||
|
||||
# = Action View Context
|
||||
#
|
||||
# Action View contexts are supplied to Action Controller to render a template.
|
||||
|
@ -16,7 +12,6 @@ module ActionView
|
|||
# object that includes this module (although you can call _prepare_context
|
||||
# defined below).
|
||||
module Context
|
||||
include CompiledTemplates
|
||||
attr_accessor :output_buffer, :view_flow
|
||||
|
||||
# Prepares the context by setting the appropriate instance variables.
|
||||
|
|
Loading…
Reference in New Issue