Skip to content

Instantly share code, notes, and snippets.

@BJClark
Created September 4, 2009 20:13
Show Gist options
  • Save BJClark/181096 to your computer and use it in GitHub Desktop.
Save BJClark/181096 to your computer and use it in GitHub Desktop.
<!--- I'd like this --->
<label for="merchant_name">Name
<input id="merchant_name" name="merchant[name]" size="30" type="text" /></label>
<label for="merchant_subdomain">Subdomain
<input id="merchant_subdomain" name="merchant[subdomain]" size="30" type="text" />
<span class='subdomain'></span>.chargify.local is currently <span class='availability'>available.</span>
</label>
<label for="merchant_email">Email
<input id="merchant_email" name="merchant[email]" size="30" type="text" /></label>
<input id="merchant_submit" name="commit" type="submit" value="Create Site" />
#So I try this:
=f.label :name
=f.text_field :name
=f.label :subdomain
=f.text_field :subdomain
%span.subdomain
\.
=request.domain
is currently
%span.availability
available.
=f.label :email
=f.text_field :email
But that throws some crazy syntax error that doesn't make sense (on the last =f.label line)
#So I change that to:
=f.label :name
=f.text_field :name
=f.label :subdomain
=f.text_field :subdomain
%span.subdomain
\.
=request.domain
\is currently
%span.availability
available.
=f.label :email
=f.text_field :email
<!--- But that still doesn't generate the correct thing --->
<label for="merchant_name">Name</label>
<input id="merchant_name" name="merchant[name]" size="30" type="text" />
<label for="merchant_subdomain">Subdomain</label>
<input id="merchant_subdomain" name="merchant[subdomain]" size="30" type="text" />
<span class='subdomain'>
.
chargify.local
is currently
<span class='availability'>
available.
</span>
<label for="merchant_email">Email</label>
<input id="merchant_email" name="merchant[email]" size="30" type="text" />
<input id="merchant_submit" name="commit" type="submit" value="Create Site" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment