I’m maintaining and old app. I’m seeing in the layouts they’ve used
<body>
<%= yield :layout %>
</body>
rather than just a simple <%= yield %>
I’m guessing these are equivalent, but can someone give me a
history/explanation of the <%= yield :layout %> convention?
I can’t seem to be able to find any mention of it in old docs.
Thanks
This isn’t something thats been deprecated from rails, its also present
in
4.1.7 and its very commonly used.
I can point you to the appropriate docs here:
Cheers
George
On Thu, Nov 6, 2014 at 3:51 PM, bruka [email protected] wrote:
history/explanation of the <%= yield :layout %> convention?
I can’t seem to be able to find any mention of it in old docs.
Thanks
–
6-8 Long Lane, London EC1A 9HF
+44 (0)333 240 2222
www.rentify.com
I think you misunderstood my question.
I asked about the :layout symbol specifically, not the general yielding
to
a specific block associated with content_for, i.e. <%= yield :head %>
The <%= yield :layout %> is not associated with a content_for and it is
in
fact yielding to the view template, same as plain <%= yield %>
On Thu, Nov 6, 2014 at 11:22 AM, George D. [email protected]
wrote:
+44 (0)333 240 2222
www.rentify.com
–
Besnik Ruka – Software Engineer at IData Inc.
[email protected]
703-378-2110 x 809
unsubscribe
Steve Lack
310-737-8686
Skype: stevenlack1
Live Chat: http://genlack.com/
You can also find me on: [image: Twitter]
http://www.twitter.com/Genlack[image:
Facebook] http://www.facebook.com/pages/Genlackcom/282160767069[image:
Linkedin] http://www.linkedin.com/in/stevelack