robodisco
robodisco

Reputation: 4272

devise and invitable plugin : how do you set the invitation_limit

Hi ive got devise and the invitable plugin working but Id like to set a default limit on how many people a user can invite.

According to the documentaion on github it mentions that you can set this number via invitation_limit

however ive tried using this in devises config file but it complains of undefined method.

I checked the source and theres definately an invitation_limit attribute being decremented. I tried adding this as an attribute to my users model but it still complains.

How do you setup this up????

Upvotes: 2

Views: 536

Answers (1)

Andrew Gertig
Andrew Gertig

Reputation: 138

My guess is that you are using the version of the devise_invitable gem that does not include "invitation_limit." You will need to use at least v0.4.rc5 to get all the new coolness that the documentation talks about. It's definitely a little confusing. Your Gemfile should look like this:

gem 'devise', '~>1.2.0'
gem 'devise_invitable', '~>0.4.rc5'

See here for a more in depth write-up about this issue with devise_invitable.

Upvotes: 1

Related Questions