Matt Jones wrote in post #1155588: > On Wednesday, 20 August 2014 03:45:44 UTC-4, Ruby-Forum.com User wrote: > You're going to need to figure out why @line_item.expensescounter is > nil. > Post the code here if you need help finding the problem.
> Code of application_controller.rb: class ApplicationController < ActionController::Base protect_from_forgery include SessionsHelper private def current_expensescounter Expensescounter.find(session[:expensescounter_id]) logger.info "expensescounter_id is #{(session[:expensescounter_id])}" rescue ActiveRecord::RecordNotFound expensescounter = Expensescounter.create session[:expensescounter_id] = expensescounter.id expensescouter end end Any help would be appreciated. -- 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/a4022eefdb5a18074c0ce0a31b8133cd%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout.