Forum: Ruby on Rails ActionView::Template Error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bcb581c41b77afce0bd1a63ce2ff1b9c?d=identicon&s=25 Serdar Kılıç (Guest)
on 2007-03-11 08:08
(Received via mailing list)
All,
I've started to get ActionView::TemplateError (undefined method
`errors' for nil:NilClass) on all forms that have error_message_on.
I'm stumped as this is not ocurring in development but in production
so I can't reproduce the error locally.

ActionView::TemplateError (undefined method `errors' for nil:NilClass)
on line #5 of app/views/account/_register_form.rht$
2: <fieldset>
3:      <legend>Registration</legend>
4: <p>
5:      <%=error_message_on(:user, :email, 'Email ', '', 'inputError')%>
6:      <div class="reg information">You'll be logging into netTrader
with this address</div>
7:      <label for="user_email" class="required">Email</label>
8:      <%= text_field 'user', 'email', {:maxlength => 200, :size => 30}
%>

    /home/2363/data/rubygems/gems/gems/actionpack-1.12.5/lib/action_view/helpers/active_record_helper.rb:88:in
`error_message_on'
    #{RAILS_ROOT}/app/views/account/_register_form.rhtml:5:in
`_run_rhtml_account__register_form'

--
Cheers,
Serdar Kilic
http://weblog.kilic.net/
This topic is locked and can not be replied to.