mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-22 10:10:12 +01:00
20 lines
408 B
Ruby
20 lines
408 B
Ruby
|
|
module ActionView #:nodoc:
|
||
|
|
class InlineTemplate #:nodoc:
|
||
|
|
include Renderable
|
||
|
|
|
||
|
|
attr_reader :source, :extension, :method_segment
|
||
|
|
|
||
|
|
def initialize(source, type = nil)
|
||
|
|
@source = source
|
||
|
|
@extension = type
|
||
|
|
@method_segment = "inline_#{@source.hash.abs}"
|
||
|
|
end
|
||
|
|
|
||
|
|
private
|
||
|
|
# Always recompile inline templates
|
||
|
|
def recompile?(local_assigns)
|
||
|
|
true
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|