Skip to content

Instantly share code, notes, and snippets.

@arekt
Created March 30, 2013 05:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arekt/5275479 to your computer and use it in GitHub Desktop.
Save arekt/5275479 to your computer and use it in GitHub Desktop.
Example how to use content_for
+ 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