Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use different class name conventions for layous, generate better view…
…/template for layouts
- Loading branch information
Joe Ferris
committed
Nov 11, 2009
1 parent
4075d5d
commit df7d232
Showing
6 changed files
with
144 additions
and
35 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<html> | ||
<body> | ||
<h1><%= view_class_name %></h1> | ||
<p>Edit me at <%= template_path %></p> | ||
<p>Edit my view at <%= view_path %></p> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class <%= view_class_name %> < Rails::Effigy::View | ||
private | ||
def transform | ||
# Apply transformations to the template file here: | ||
# text('h1', 'Hello') | ||
# Assigns from the action are available: | ||
# text('h1', @post.title) | ||
# Transformations will be applied to to the template file: | ||
# <%= template_path %> | ||
# See the documentation for more information. | ||
html('body', content_for(:layout)) | ||
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
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