NullVoxPopuli
NullVoxPopuli

Reputation: 65173

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

  <%= 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 it to work with sinatra?

Upvotes: 1

Views: 595

Answers (1)

Chris Ledet
Chris Ledet

Reputation: 11628

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.

Upvotes: 2

Related Questions