using forms with ruby rails code example
Example 1: sendgrid ruby on rails
ActionMailer::Base.smtp_settings = {
:user_name => 'your_sendgrid_username',
:password => 'your_sendgrid_password',
:domain => 'yourdomain.com',
:address => 'smtp.sendgrid.net',
:port => 465,
:authentication => :plain,
:enable_starttls_auto => true
}
Example 2: ruby rails delete all of a model in console
user.destroy #For a single record
user.agents.destroy_all #For a collection