Skip to content

Instantly share code, notes, and snippets.

@uptownhr
Created January 23, 2015 01:30
Show Gist options
  • Save uptownhr/c0c5cbabb0e26e5bcea9 to your computer and use it in GitHub Desktop.
Save uptownhr/c0c5cbabb0e26e5bcea9 to your computer and use it in GitHub Desktop.
forme in sinatra ERB outputing to escaped string
<% form(@user, :action => '/user/update/' + @user.id.to_s, :method => 'PUT') do |f| %>
<%= partial 'users/form', :locals => { :f => f } %>
<% end %>
#output in string using sinatra ERB.
#attempted to follow, https://github.com/jeremyevans/forme#erb-support
#but not sure how to change the @out_buf
&lt;span class=&quot;label&quot;&gt;Accounts&lt;/span&gt;&lt;label class=&quot;option&quot;&gt;&lt;input checked=&quot;checked&quot; id=&quot;user_account_pks_1&quot; name=&quot;user[account_pks][]&quot; type=&quot;checkbox&quot; value=&quot;1&quot;/&gt; TestAccount&lt;/label&gt;&lt;label class=&quot;option&quot;&gt;&lt;input checked=&quot;checked&quot; id=&quot;user_account_pks_2&quot; name=&quot;user[account_pks][]&quot; type=&quot;checkbox&quot; value=&quot;2&quot;/&gt; new user name&lt;/label&gt;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment