devise_invitable
devise_invitable copied to clipboard
has_many invitations not giving correct results always
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
What's the sql generated when works and when return empty array?