Ruby on Rails Monday, August 4, 2014

I have setup expensescounter in application_controller.rb file like as
follow:

class ApplicationController < ActionController::Base

protect_from_forgery
include SessionsHelper

private
def current_expensescounter
Expensescounter.find(session[:expensescounter_id])
rescue ActiveRecord::RecordNotFound
expensescounter = Expensescounter.create
session[:expensescounter_id] = expensescounter.id
expensescounter
end
end

I can not able to find solution of this error.

Any help would be appreciate.

Kind regards.

--
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+unsubscribe@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/c950fe8278aabf48fc4beddaa6ea1068%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment