Confirmation email with devise gem in Ruby on Rails 4 - Error:undefined local variable or method `confirmed_at' for # -


Or method `confirmation_it 'for # when I submit the registration form. How to make a confirmation email with Divise Mani in Ruby on Rail 4? What is the need for other requirements as well? My code currently looks like this:

  class users & lt; ActiveRecord :: Base # Include modules to develop by default include: #: Confirmable,: lockable, timetable and: ubiquitous schematic: database_authorized, registerable, authentic, recoverable, memorable,: Trackable, valid: Qualified_Im: PIN valid: Name, Attendance: Correct confirmation: Email, Format: {with: /.A ([^ @ \ s ++) @ ((::? :: -JS- 0- 9] +++ ) + Edu) \ z /} end   
  class addConfirmableToDevise & lt; ActiveRecord :: Migration Def changed change_table (): | T | T.confirmable end add_index: user,: confirmation_token ,: unique = & gt; True end DEF self.up add_column: user,: confirmation_token: string add_column: user ,: confirm_at ,: datetime add_column: user,: confirmation_sent_at ,: datetime # add_column: users ,: uncconfirmed_email, string # only if using reconfirmable add_index Taxes: User, confirmation_token ,: unique = & gt; True # User.reset_column_information # Some types of updates are required, but for update_all not to run #migration and updating all existing # users as confirmation, to avoid short-term windows, the following users Update_Ol ((confirm_at = & gt; time.No names) All existing user accounts must be able to log in after this. End DEF self.down removal_columns: user, confirmation_token, confirm_at, confirmation_sent_at # remove_columns user: unsupported_email # if only using reconfirmable end end    

Have you made the necessary migration to add a confirmable module to the user?

Edit: I've edited it in my Rail Migration:

  Class AddConfirmableToDevise & lt; ActiveRecord :: Migration def up_column: User, confirmation_token, string add_column: user,: confirm_at ,: datetime add_column: user,: confirmation_sent_at ,: datetime # add_column: users ,: uncconfirmed_email, string # only if using reconfirmable add_index: User,: confirmation_token ,: unique = & gt; True # User.reset_column_information # Some types of updates are required, but for update_all not to run #migration and updating all existing # users as confirmation, to avoid short-term windows, the following users Update_Ol ((confirm_at = & gt; time.No names) All existing user accounts must be able to log in after this. End Down: _Username: confirmation_token, confirm_at, confirmation_sent_t # deleted_kale: user,: unconfirmed_email # if only using redefined end-end    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -