app/controllers/concerns/invitation/invites_helper.rb
def deliver_email(mail)
      if mail.respond_to?(:deliver_later)
        mail.deliver_later
      else
        mail.deliver
      end
    end
# Use deliver_later from rails 4.2+ if available.
Use deliver_later from rails 4.2+ if available.
Use deliver_later from rails 4 . 2 + if available .
def deliver_email(mail)
      if mail.respond_to?(:deliver_later)
        mail.deliver_later
      else
        mail.deliver
      end
    end
def deliver_email ( mail ) if mail . respond_to? ( :deliver_later ) mail . deliver_later else mail . deliver end end
Use deliver_later from rails 4.2+ if available.
Use deliver_later from rails 4 . 2 + if available .
mail