0

I'm having a problem on devise + devise_invitable + cancan configuration: if a User registers in a normal way without the invite, the final step of the job described here is not performed: https://github.com/scambra/devise_invitable/blob/master/lib/devise_invitable/controllers/registrations.rb

The reason is that these attributes are unaccessible for editing without the password, while the attr_accessible is set for them all.

How could one fix this obstacle? It's a real shame to know how much time I've spent trying to figure this out, but still don't get it :)

P.S. The respective values cannot be changed through the console as well.

lyuba
  • 6,250
  • 7
  • 27
  • 37

1 Answers1

0

I've finally discovered the reason for this strange behavior: it was a validation statement which I accidentally put to the User model:

validates :password, :presence => true

It's not needed, of course.

I'm leaving this question alive just in case anyone else gets into the same stupid situation.

lyuba
  • 6,250
  • 7
  • 27
  • 37