で環境設定を取得します。 development.rb
で私は私は私のコントローラにアクセスしたいdevelopment.rbにおけるいくつかの電子メールの設定を持っているレールコントローラ
設定は以下のとおりです。私のコントローラ/アクションで
config.notify_submited_transaction = '[email protected],[email protected]'
config.notify_approved_transaction = '[email protected]'
私はこのしようとしています:
@to = Rails.env.notify_submited_transaction
@subject = 'AM - Vendor Submitted Transaction'
AmMailer.vendor_submited_transaction(@to, @subject, current_user).deliver
このエラーになりかかわら:
undefined method `notify_submited_transaction'
が、私はわかりません私が設定した設定値を取得する方法。
ありがとうございました。
これはhttp://stackoverflow.com/questions/592554/best-way-to-create-custom-config-options-for-my-rails-appとHTTPの可能な重複は次のとおりです。 //stackoverflow.com/questions/1450285/how-to-define-custom-configuration-variables-in-rails – Ernest