我有这行:如何使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>;