开发者

Ruby w/ Sinatra (ERB): my link is throwing a syntax error, but it didn't in rails... how do I fix it?

开发者 https://www.devze.com 2023-02-07 23:16 出处:网络
<%= link_to( { :controller => \'board\', :action => \'start_game\', :human_is_first => true}, :remote => true) do %>
  <%= link_to( { :controller => 'board', :action => 'start_game', :human_is_first => true  }, :remote => true) do %>
    <span>Yes</span>

  <% end %>

works perfectly in rails 3, how do i get开发者_如何学Go it to work with sinatra?


link_to a helper method from the module ActionView::Helpers::UrlHelper.

You would need to create your own method or output the html <a> tag to achieve the same thing.

0

精彩评论

暂无评论...
验证码 换一张
取 消