> > There is not much point putting the log line after the line that is > causing processing to stop due to the error. Also there is not much > point putting it anywhere in that bit of code as we already know (from > the error message) that it is nil. I expected that you would put it > in the area where you are setting up @employee to try to work out why > it is nil. > > Colin
if u mean like the below, I did and the development log is the same def add_rosterduty @rosterduty = RosterDuty.new() @employee = Employee.find(params[:id]) logger.info( "Employee: #{@employee.inspect}") if request.post? and @rosterduty.save flash[:notice] = t('flash7') redirect_to :controller => "employee", :action => "add_rosterduty" end end -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2e7239ffb8a23f1280216a1330b07994%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout.