2012-08-29 6 views
8

を追加します。 .end "これらすべての引数を持つ構文..ありがとう!Railsは、私が「のlink_to」関数を経由して、「アンフォロー」ボタンを生成するには、このコードを持っているいくつかの内部HTML

+0

何を達成しようとしていますか?なぜそこにブロックを貼りたいのですか? – varatis

+0

bootstrap [documentation](http://twitter.github.com/bootstrap/base-css.html#icons)に示すように、アイコンを追加したいと思います。 – Ciampo

答えて

15

最初のパラメータをスキップし、残りを括弧で囲み、do/endを追加することができます。

<%= link_to(user_user_relationship_path(id:@relationship.id), remote: true, id: "follow_#{@user.id}", class:"btn btn-small btn-danger", method: :delete) do %> 
    <!-- your button html here --> 
<% end %> 
関連する問題