Created
October 11, 2008 15:53
-
-
Save queso/16284 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
########## Why does the yield output outside the content_tag block? | |
# Method | |
def submit(*args) | |
@template.content_tag(:div, :class => "save_actions") { | |
super(*args) + (yield).to_s | |
} | |
end | |
# Calling Haml block | |
= f.submit "Sign up" do | |
- if @site.beta_invites? | |
or | |
= link_to "Request a beta invite", new_invite_path | |
### Output | |
or | |
<a href="/invites/new">Request a beta invite</a> | |
<div class="save_actions"><input id="user_submit" name="commit" type="submit" value="Sign up" /></div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment