Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed lagacy TemplateHandler#render API. Left in a legacy TemplateH…
…andler and Compilable stub so plugins will not have to change anything.
- Loading branch information
Showing
7 changed files
with
20 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,14 @@ | ||
module ActionView | ||
class TemplateHandler | ||
def self.compilable? | ||
false | ||
end | ||
|
||
def initialize(view) | ||
@view = view | ||
end | ||
# Legacy TemplateHandler stub | ||
|
||
def render(template, local_assigns = {}) | ||
end | ||
|
||
def compile(template) | ||
module ActionView | ||
module TemplateHandlers | ||
module Compilable | ||
end | ||
end | ||
|
||
def compilable? | ||
self.class.compilable? | ||
class TemplateHandler | ||
def self.call(template) | ||
new.compile(template) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
actionpack/lib/action_view/template_handlers/compilable.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d2ccb85
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performance.
Adding your own custom render is still easy. Nothing stops you from defining a method like render_foo.