Skip to content

Instantly share code, notes, and snippets.

@abhianair
abhianair / .rb
Created October 29, 2018 12:36
config code for email verification in config>>environment>>development.rb
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_url_options = { host: "localhost:3000" }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
user_name: "[email protected]",
password: "password",
domain: "localhost:3000",
address: "smtp.gmail.com",
port: 587,
@abhianair
abhianair / .erb
Last active October 17, 2018 05:36
Count the number of posts created by a user ( current user ) in RoR
<h1>Posts Created: <span class="dashspan"><%= @app = current_user.posts.count %></span></h1>