-
-
Save tubbo/4040872 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <div id="header_block"> | |
| <div id="header_block_title"><%= title %></div> | |
| <div id="header_block_content"><%= content %></div> | |
| </div> | |
| <!-- | |
| call it with: | |
| <%= render 'header_block', title: "Something", content: "A bit more" %> | |
| --> |
This file contains hidden or 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
| def header_block(title, content) | |
| content_tag :div, header_block_title(title)+header_block_content(content), id: 'header_block' | |
| end | |
| def header_block_title(title) | |
| content_tag :div, title, id: 'header_block_title' | |
| end | |
| def header_block_content(content) | |
| content_tag :div, content, id: 'header_block_content' | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment