rails button_to replace quotes with single quoute
I try should get button_to but with no qoutes
while rendering
<%= (button_to "Delete", radio_tag_path(tag), :method=>:delete,
:class=>:destroy,:confirm=>"Are you sure?") %>
the output is
<form action="/radio/tags/654" class="button_to" method="post"><div><input
name="_method" type="hidden" value="delete" /><input class="destroy"
data-confirm="Are you sure?" type="submit" value="Delete" /><input
name="authenticity_token" type="hidden"
value="eXM0McnTzuhnYIxrLLYF7kjp76fdMdZpq6HPc++ogog=" /></div></form>
but i need with no qoutes
than i rendered
<%= (button_to "Delete", radio_tag_path(tag), :method=>:delete,
:class=>:destroy,:confirm=>"Are you sure?")**.gsub('\"','\'')** %>
but then the output is like html_safe
<form action="/radio/tags/654" class="button_to"
method="post"><div><input name="_method"
type="hidden" value="delete" /><input
class="destroy" data-confirm="Are you sure?"
type="submit" value="Delete" /><input
name="authenticity_token" type="hidden"
value="eXM0McnTzuhnYIxrLLYF7kjp76fdMdZpq6HPc++ogog="
/></div></form>
how can i remove the quotes but still use the html tags
No comments:
Post a Comment