On 4 August 2014 09:52, Jaimin Pandya <lists@ruby-forum.com> wrote:
> 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.
That code is just returning an object. It is not allocating a value
to @line_item.expensescounter.
Colin
--
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/CAL%3D0gLuspVAi0haws15-ZyciAEpx%2B5ansWraJqVuf6_waj9XJw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment