NoMethodError in Admin/mail_magazine_templates#new
Showing app/views/admin/mail_magazine_templates/_form.html.erb where line #6 raised:
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.+
Extracted source (around line #6):
3: <%= javascript_include_tag 'admin/mail_magazine' %>
4: <script type="text/javascript">
5: function textTypeChange(value){
6: writeRichText('mail_magazine_template[body]','<%=h_apos @mail_magazine_template.body %>', 400, 690, true, false, value, "<%=h ActionController::Base.relative_url_root + '/images/emoticons/' %>");
7: }
8: function toConfirm() {
9: if (document.getElementById('mail_magazine_template[body]').contentDocument != null) {
Trace of template inclusion: app/views/admin/mail_magazine_templates/new.html.erb
RAILS_ROOT: /Users/smoriwaki/Documents/rails/elecoma-2.0
Application Trace | Framework Trace | Full Trace
/Users/smoriwaki/Documents/rails/elecoma-2.0/app/views/admin/mail_magazine_templates/_form.html.erb:6:in `_run_erb_app47views47admin47mail_magazine_templates47_form46html46erb_locals_form_object'
/Users/smoriwaki/Documents/rails/elecoma-2.0/app/views/admin/mail_magazine_templates/_form.html.erb:1:in `_run_erb_app47views47admin47mail_magazine_templates47_form46html46erb_locals_form_object'
/Users/smoriwaki/Documents/rails/elecoma-2.0/app/views/admin/mail_magazine_templates/new.html.erb:8:in `_run_erb_app47views47admin47mail_magazine_templates47new46html46erb'
メールマガジンテンプレート作成画面で実行時エラーが発生します。
environment.rbでconfig.action_controller.relative_url_rootを設定してやればエラーは出なくなりますが,設定されていない場合でも動作する様にした方が良いのではないでしょうか。