-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem using current_user.following?(user) #84
Comments
what's the result of |
I had same problem with
excuse me for my bad english. I can't explain better. |
@fdahmadi this is an old solution, this is what the code look like right now DEFAULT_PARENTS = [ApplicationRecord, ActiveRecord::Base]
# Retrieves the parent class name if using STI.
def parent_class_name(obj)
unless parent_classes.include?(obj.class.superclass)
return obj.class.superclass.name
end
obj.class.name
end @nelsonlho so all what you have to do is listing your parent classes to in the initializer ActsAsFollower.custom_parent_classes = [Book, Author, Publisher, User] |
My first approach is wrong. Sorry. In my application users can follows each other
It works in my app. maybe it works on your app too. excuse me for my bad english. |
I also experienced this issue on Use my fork if you like: gem 'acts_as_follower', github: 'mrjlynch/acts_as_follower', branch: 'rails_5' |
I think main problem within started Spring process & sometimes it's stuck. |
@nelsonlho As @jeremylynch mentioned, I suspect that the merge of #56 should fix this. Does that take care of this issue? |
I am using acts_as_follower with Devise
So I notice something funny with
current_user.following?(user)
current_user.following?(user) will always resolve to false, even when it's true, unless I restart my rails server
any thoughts?
The text was updated successfully, but these errors were encountered: