Skip to content
Snippets Groups Projects
Commit 6c407ccf authored by Bruno Nocera Zanette's avatar Bruno Nocera Zanette
Browse files

Add button to create Like Edge (User->Object)

parent 22354507
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,8 @@ class GraphTestsController < ApplicationController ...@@ -3,6 +3,8 @@ class GraphTestsController < ApplicationController
end end
def create def create
repository.for(:edge).create_like_edge params[:from_id], params[:to_id]
redirect_to :back
end end
def delete def delete
......
...@@ -11,3 +11,10 @@ ...@@ -11,3 +11,10 @@
<% end %> <% end %>
</ul> </ul>
</ul> </ul>
<%= button_to(
"Curtir",
{ action: "create", controller: "graph_tests" },
method: :post,
form: { from_id: @user["id"], to_id: @object[0]["@rid"] }
) %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment