Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

undefined method `invitation_created_at=' for #<User:0x007fd89b773c80> #377

Closed
karl-petter opened this Issue Sep 19, 2013 · 3 comments

Comments

Projects
None yet
3 participants

I get undefined method `invitation_created_at=' for #User:0x007fd89b773c80 when I try to use User.invite!(:email => invitation_email). invitation_email comes from a form a user fills in to invite someone else.

I have not touched this rails app for a while but should just fix a couple of small issues and did a bundle update. Realised I didnt use the latest Devise and devinse_invitable but now has this in my Gemfile to use 1.2.2 and Device 3.1.0

gem 'devise', '>= 3.1'
gem 'devise_invitable', '>= 1.2', :git => 'https://github.com/scambra/devise_invitable'
´´´
Do not understand why this does not work? Do I need to do anything else when upgrading?
Owner

scambra commented Sep 19, 2013

You must add invitation_created_at column, it was added on 1.2

@scambra scambra closed this Sep 19, 2013

Is this backward compatible with 'invitation_sent_at' from 1.1.x? I have an existing app and don't want to break existing invites when I deploy the upgrade to 1.2. Thanks!

Owner

scambra commented Jan 31, 2014

If invitation_created_at is null, invitation_sent_at is used. Also, you can copy invitation_sent_at to invitation_created_at. If you don't use skip_invitation they should have same time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment