fix link to follow other users

This commit is contained in:
Andrew Brown 2020-07-21 15:45:02 -07:00
parent 2f3e1514df
commit d3d53745ad
3 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ class UserFollowingsController < ApplicationController
# POST /user_followings
def create
user = User.find_by(id: params[:followed_user_id])
user = User.find_by(id: user_following_params.fetch(:followed_user_id))
return unless user.present?
return if user_signed_in? && current_user.blocked_by?(user)

View File

@ -110,5 +110,5 @@ Vehicle -
<div class="card-panel blue white-text">
We're starting with a few collaborative collections that anyone can submit to and browse.
The ability to create your own collections will be available soon.
The ability to create your own collections will be available for more users soon.
</div>

View File

@ -20,7 +20,7 @@
<% else %>
<%= form_for UserFollowing.new, method: :post do |f| %>
<%= f.hidden_field :followed_user_id, value: @user.id %>
<%= link_to '#', onclick: "$('#new_user_following').submit()", class: 'collection-item blue-text' do %>
<%= link_to '#', onclick: "$('#new_user_following').first().submit()", class: 'collection-item blue-text' do %>
Follow this user
<span class="secondary-content">
<i class="material-icons green-text"><%= User.icon %></i>