Reputation:
After setup the act_as_follower gem
and properly added the button_link on user view show and configure the routes and the controller
Rails spits out this error about did not find table ¨ and did not specify which table.
ActiveRecord::StatementInvalid in UsersController#follow Could not find table ''
just point to current_user.follow(@user) on users controller.
Someone have any idea about this issue?
def follow
@user = User.friendly.find(params[:id])
if current_user == @user
flash[:error] = 'You cannot follow yourself.'
else
current_user.follow(@user)
end
end
Upvotes: 0
Views: 251
Reputation:
OK my mistake on rails 5 you need to use the master branch
gem 'acts_as_follower', github: 'tcocca/acts_as_follower', branch: 'master'
Upvotes: 1