Created
March 6, 2014 17:51
-
-
Save tanakahisateru/9395496 to your computer and use it in GitHub Desktop.
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
<?php $layout = $view->layout('layout.php'); ?> | |
<?php $block = $layout->block('main'); ?> | |
<p>hello world</p> | |
<?php $block->end(); ?> | |
<?php $block = $layout->block('sub'); ?> | |
<p>bye bye world</p> | |
<?php $block->end(); ?> | |
<?php $layout->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
<% view.layout 'layout.rb' do |layout| %> | |
<% layout.block 'main' do |block| %> | |
<p>hello world</p> | |
<% end %> | |
<% layout.block 'sub' do |block| %> | |
<p>bye bye world</p> | |
<% end %> | |
<% end%> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
コードの見た目は悪くても、こういうののほうがドメイン特化ボキャブラリーを拡張しやすくて、実務者の欲しいものに近く、普通に仕事でやってる人ほど見た目に引っ張られたらだめなんじゃないのかな、と思っている