<% @links.each do |link| %>
<p class="source list-group-item"><%= link_to 'Plz', songs_path,
method: :current_user.save_link(link), data: {confirm: "Are you sure?"} %></p>
<% end %>
I tried to activate the method but getting error saying there is no such a method.
Here is my controller code.
def self.save_link(linkurl)
@current_user = current_user.artist_url
@current_user= linkurl
@current_user.save
flash[:notice] = "Saved!"
redirect_to root_path
end