devise_invitable icon indicating copy to clipboard operation
devise_invitable copied to clipboard

has_many invitations not giving correct results always

Open vkeziah opened this issue 10 years ago • 1 comments

I am not sure this is very strange behavior , sometimes user.invitations showing empty array though current user has some invitations , not sure why its behaving like this .

I configure like the following in my user model

has_many :invitations, :class_name => self.to_s, :as => :invited_by

and calling like this user.invitations

did I do any wrong or do I need to configure any other elements for getting users count invited by current user

vkeziah avatar Dec 24 '14 09:12 vkeziah

What's the sql generated when works and when return empty array?

scambra avatar Dec 24 '14 10:12 scambra