Created
February 23, 2009 02:18
-
-
Save lachie/68752 to your computer and use it in GitHub Desktop.
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
#Ruby assignment option to assign unless nil | |
replacement_content = page_contents.content_label_find(item) | |
element.inner_html = replacement_content if replacement_content | |
# or | |
if pc = page_contents.content_label_find(item) | |
element.inner_html = pc | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment