2008-04-19 11:16:32 -04:00
|
|
|
module ActionView #:nodoc:
|
2008-07-03 14:06:00 -04:00
|
|
|
class InlineTemplate #:nodoc:
|
2008-07-05 13:05:50 -04:00
|
|
|
include Renderable
|
2008-07-03 14:06:00 -04:00
|
|
|
|
2008-07-12 15:33:46 -04:00
|
|
|
attr_reader :source, :extension, :method_segment
|
2008-06-15 22:22:27 -04:00
|
|
|
|
2008-07-12 15:33:46 -04:00
|
|
|
def initialize(source, type = nil)
|
2008-04-19 11:16:32 -04:00
|
|
|
@source = source
|
|
|
|
@extension = type
|
2008-07-06 00:54:11 -04:00
|
|
|
@method_segment = "inline_#{@source.hash.abs}"
|
2008-04-19 11:16:32 -04:00
|
|
|
end
|
2008-07-12 15:33:46 -04:00
|
|
|
|
|
|
|
private
|
|
|
|
# Always recompile inline templates
|
|
|
|
def recompile?(local_assigns)
|
|
|
|
true
|
|
|
|
end
|
2008-04-19 11:16:32 -04:00
|
|
|
end
|
|
|
|
end
|