【发布时间】:2014-06-11 19:13:16
【问题描述】:
我对 Ruby on Rails 完全陌生,我必须构建一个电子邮件系统,该系统首先使用公司 ID 和omniauth LDAP 插件登录(我已经拥有所有凭据)。我也有一个已经制作好的表格的项目。我想要完成的是在用户登录并填写表格后将电子邮件发送给特定的人。到目前为止,我遇到的所有教程都只涉及向创建配置文件的用户发送自动确认电子邮件,但这根本不是我需要的。我不需要应用程序创建任何新用户,而只想将我创建的 html/文本模板发送到指定的电子邮件。我不确定要提供哪些文件代码,这是我第一次使用 stackoverflow 提问,所以我提前为没有提供所有正确信息而道歉。我正在使用设计来创建用户模型。我可以提供任何必要的文件代码,如果有人能指出我正确的方向,那就太好了!
我的 gemfile 看起来像这样:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'
gem 'devise'
gem 'omniauth'
gem 'omniauth-ldap', :git => 'https://github.com/intridea/omniauth-ldap.git'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin
【问题讨论】:
标签: ruby-on-rails ruby email devise ldap