Created
March 30, 2013 05:16
-
-
Save arekt/5275479 to your computer and use it in GitHub Desktop.
Example how to use content_for
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
+ def ble # concatenates everything and you can render whole part in partial by calling yield :ble, or content_for :ble | |
+ content_for :ble, content_tag(:p, "Here form starts:") | |
+ content_for :ble, content_tag(:p, "Here form starts:") | |
+ content_for :ble, content_tag(:p, "Here form starts:") | |
+ content_for :ble, content_tag(:p, "Here form starts:") | |
+ render "shared/bootstrap/ble" | |
+ end | |
+ | |
+ def ble2 # you can render everything on the end of helper as well | |
+ content_for :ble, content_tag(:p, "Here form starts: asdfasdf") | |
+ content_for :ble, content_tag(:p, "Here form starts:") | |
+ content_for :ble, content_tag(:p, "Here form starts:") | |
+ content_for :ble, content_tag(:p, "Here form starts:") | |
+ return content_for :ble | |
+ end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment