scambra/devise_invitable — Issue #147: devise_invitable incompatible with amistad (friendship) gem
Author: kevinelliott
Created: 2011-11-30 21:06:25+00:00
State: open

Error triggered:

```ArgumentError in Devise::SessionsController#create
wrong number of arguments (0 for 1)
```

Traceback:

```amistad (0.7.5) lib/amistad/active_record/friend_model.rb:124:in `invited?'
devise_invitable (0.6.0) lib/devise_invitable/model.rb:73:in `valid_password?'
devise (1.5.1) lib/devise/strategies/database_authenticatable.rb:10:in `block in authenticate!'
devise (1.5.1) lib/devise/models/authenticatable.rb:64:in `valid_for_authentication?'
devise (1.5.1) lib/devise/models/lockable.rb:82:in `valid_for_authentication?'
devise (1.5.1) lib/devise/strategies/authenticatable.rb:19:in `validate'
devise (1.5.1) lib/devise/strategies/database_authenticatable.rb:10:in `authenticate!'
warden (1.1.0) lib/warden/strategies/base.rb:53:in `_run!'
warden (1.1.0) lib/warden/proxy.rb:311:in `block in _run_strategies_for'
warden (1.1.0) lib/warden/proxy.rb:306:in `each'
warden (1.1.0) lib/warden/proxy.rb:306:in `_run_strategies_for'
warden (1.1.0) lib/warden/proxy.rb:279:in `_perform_authentication'
warden (1.1.0) lib/warden/proxy.rb:113:in `authenticate!'
devise (1.5.1) app/controllers/devise/sessions_controller.rb:15:in `create'
```

Looks to me like they're overlapping on user model included methods. Also, terminology seems to overlap when they have different meanings. For example, devise_invitable uses "invite" correctly, in terms of sending invitations to people to join the service, where amistad uses "invite" to connect friends together. There may never be a resolution to this terminology usage, but perhaps there is a way to contextualize the method names.

I see these Rails 3 compatible (and actively developed) gems as two different pieces (friendship and invitations), so it would be nice to find a way to make them work together. Otherwise, it would be interesting to hear about other ways people have added friendships to their projects in a devise_invitable compatible way.