2008-05-17 23:22:34 -05:00
|
|
|
module ActionView #:nodoc:
|
2008-10-27 01:47:01 -05:00
|
|
|
class InlineTemplate #:nodoc:
|
|
|
|
include Renderable
|
|
|
|
|
|
|
|
attr_reader :source, :extension, :method_segment
|
|
|
|
|
|
|
|
def initialize(source, type = nil)
|
2008-05-17 23:22:34 -05:00
|
|
|
@source = source
|
|
|
|
@extension = type
|
2008-10-27 01:47:01 -05:00
|
|
|
@method_segment = "inline_#{@source.hash.abs}"
|
2008-05-17 23:22:34 -05:00
|
|
|
end
|
2008-10-27 01:47:01 -05:00
|
|
|
|
|
|
|
private
|
|
|
|
# Always recompile inline templates
|
|
|
|
def recompile?(local_assigns)
|
|
|
|
true
|
|
|
|
end
|
2008-05-17 23:22:34 -05:00
|
|
|
end
|
|
|
|
end
|