devise :reconfirmable in model causes migration error

28 views
Skip to first unread message

fugee ohu

unread,
Dec 21, 2015, 5:51:59 AM12/21/15
to Ruby on Rails: Talk
i get uninitialized constant reconfirmable when i run the migration

Colin Law

unread,
Dec 21, 2015, 6:29:08 AM12/21/15
to Ruby on Rails: Talk
On 21 December 2015 at 10:51, fugee ohu <fuge...@gmail.com> wrote:
> i get uninitialized constant reconfirmable when i run the migration

I imagine that in user.rb you have specified devise :reconfirmable.
If so are you sure that is a valid option?

If it is not that then show us user.rb

Colin

fugee ohu

unread,
Dec 21, 2015, 11:12:23 AM12/21/15
to Ruby on Rails: Talk
It may not be a valid option Maybe it should only be specified as reconfirmable=true in devise.rb and not in the model

fugee ohu

unread,
Dec 21, 2015, 11:14:25 AM12/21/15
to Ruby on Rails: Talk
It seems clear that it's a bug in devise which causes devise to omit the required column unconfirmed_email from the table when it generates the migration The workaround's easy enough, just do it myself, but shouldn't this be fixed by now and why am i the only one who cares?


On Monday, December 21, 2015 at 6:29:08 AM UTC-5, Colin Law wrote:

Colin Law

unread,
Dec 21, 2015, 11:41:30 AM12/21/15
to Ruby on Rails: Talk
On 21 December 2015 at 16:12, fugee ohu <fuge...@gmail.com> wrote:
> It may not be a valid option Maybe it should only be specified as
> reconfirmable=true in devise.rb and not in the model

I believe that is the case. It is a configuration option on devise,
not on the user.

Colin

>
> On Monday, December 21, 2015 at 6:29:08 AM UTC-5, Colin Law wrote:
>>
>> On 21 December 2015 at 10:51, fugee ohu <fuge...@gmail.com> wrote:
>> > i get uninitialized constant reconfirmable when i run the migration
>>
>> I imagine that in user.rb you have specified devise :reconfirmable.
>> If so are you sure that is a valid option?
>>
>> If it is not that then show us user.rb
>>
>> Colin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/6b125232-f5a8-425f-b33a-f1c74f2b2efe%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Hassan Schroeder

unread,
Dec 21, 2015, 12:10:56 PM12/21/15
to rubyonrails-talk
On Mon, Dec 21, 2015 at 8:14 AM, fugee ohu <fuge...@gmail.com> wrote:
> It seems clear that it's a bug in devise

Well, no, it doesn't actually :-)

If you want the "confirmable" behavior, you need to explicitly enable
that in both your model and in the migration - it's commented out by
default.

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan
Consulting Availability : Silicon Valley or remote

fugee ohu

unread,
Dec 21, 2015, 1:46:39 PM12/21/15
to Ruby on Rails: Talk
yikes ... thanks, i think i should have read the migrations, thanks again
Reply all
Reply to author
Forward
0 new messages