Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Add content_for?(name) helper

#1311

Sometimes I do things in my layout based on whether content has been yielded to a particular content_for label.

Easy to do at the moment - but I reckoned it might be nice to hide this implementation detail. (similar to how we used to do @content_for_something but now do yield :something)

@content_for_right_col.present?

becomes

content_for?(:right_col)

Reported by Darragh Curran · October 31st, 2008 @ 05:38 PM

State: resolved
Milestone: 2.x
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Pratik
    Pratik
    • Assigned user set to Pratik
    • Title changed from add content_for?(name) helper to Add content_for?(name) helper

    Looks good. Will add after 2.3 is released.

    Thanks.

    March 6th, 2009 @ 05:13 PM

  2. Pratik
    Pratik
    • State changed from new to resolved

    Resolved in 9cb8c812f2a23ab5653a7888740a014a02c97c18

    June 21st, 2009 @ 05:42 PM

  3. Repository
  4. Repository