我有這行:如何使button_to的html輸出具有單引號而不是雙引號?
<%= button_to 'Post', newpost_path(:type => 'short_note') %>
它輸出這樣的:
<form method="post" action="/posts/newpost?type=short_note" class="button-to"><div><input type="submit" value="Add" /></div></form>;
但我需要的輸出有單引號,不是一倍。我怎樣才能做到這一點?
<form method='post' action='/posts/newpost?type=short_note' class='button-to'><div><input type='submit' value='Add' /></div></form>;