user9157191
user9157191

Reputation:

Rails 5 Could not find table ''

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

Answers (1)

user9157191
user9157191

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

Related Questions