Disable devise's :confirmable on-the-fly to batch-generate users
Solution by Wayne Conrad:
user = User.new
user.skip_confirmation!
http://rubydoc.info/github/plataformatec/devise/master/Devise/Models/Confirmable#skip_confirmation!-instance_method
Remove an argument from a Ruby method call at the root of a class. On-the-fly
devise :confirmable
adds a number of methods to your model, one of which is skip_confirmation!
:
If you don’t want confirmation to be sent on create, neither a code to
be generated, call skip_confirmation!
Example:
user = User.new
user.skip_confirmation!
Remove an argument from a Ruby method call at the root of a class. On-the-fly
devise :confirmable
adds a number of methods to your model, one of which is skip_confirmation!
:
If you don’t want confirmation to be sent on create, neither a code to
be generated, call skip_confirmation!
Example:
user = User.new
user.skip_confirmation!
Rails error : undefined method `product' for #User:0x00007faaa8c42700 Did you mean? products products=
You have left behind an old validation in your user model.
Delete this line in the app/models/user.rb filevalidates_length_of :product, maximum: 10
In Production mode on Heroku Devise's conforming mail can't send
Hey Thanks a lots to @Rich Peck and @Mandeep for there efforts. I have solved the issue now.. by putting more effort on searching. I have just added one line and it works..
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'gmail.com',
user_name: 'mygmail_id@gmail.com',
password: 'mygmail_password',
authentication: 'plain',
enable_starttls_auto: true,
:openssl_verify_mode => 'none' # This line added and it works fine
}
Related Topics
What's the Efficient Way to Multiply Two Arrays and Get Sum of Multiplied Values in Ruby
Error Installing JSON 1.8.3 with Ruby 2.4
How to Read from Redis Inside a Multi Block in Ruby
How to Refer a Local Gem in Ruby
Using Authlogic_API for Rails Rest API Access
Getting All Links of a Webpage Using Ruby
Get Table Name from Activerecord
Using Negative Conditions Within Regular Expressions
Good Resources to Learn MACruby
Have a Parent Class's Method Access the Subclass's Constants
Working with a Large Data Object Between Ruby Processes
Rails Elasticsearch Aggregation
Sass: Dealing with The Ie 4095 Selectors Per Stylesheet Restriction
Rails Sitemap_Generator Uninitialized Constant
Is There an Easy-To-Use Ftp Library for Ruby