Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion how to get instance variables in another action in rails 3

Received: by 10.52.113.98 with SMTP id ix2mr951420vdb.22.1316446218138;
        Mon, 19 Sep 2011 08:30:18 -0700 (PDT)
X-BeenThere: rubyonrails-talk@googlegroups.com
Received: by 10.220.7.146 with SMTP id d18ls14908vcd.4.gmail; Mon, 19 Sep 2011
 08:29:51 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.220.150.17 with SMTP id w17mr541665vcv.53.1316446191068; Mon,
 19 Sep 2011 08:29:51 -0700 (PDT)
Received: by o9g2000vbo.googlegroups.com with HTTP; Mon, 19 Sep 2011 08:29:51
 -0700 (PDT)
Date: Mon, 19 Sep 2011 08:29:51 -0700 (PDT)
In-Reply-To: <CAL=0gLsnSXeq8OPgGbDTW5_KWrzun8aekx8bZwEh1MnG0AvFqA@mail.gmail.com>
References: <6f0319e8-06fe-4c3b-a9ef-2362e44ef9b5@1g2000vbu.googlegroups.com>
 <CAL=0gLs3atHNGS-=6_OZDViS5JqD3LKzoiZweTt=9tidjSneSw@mail.gmail.com>
 <4E773E69.404@gmail.com> <CAL=0gLsnSXeq8OPgGbDTW5_KWrzun8aekx8bZwEh1MnG0AvFqA@mail.gmail.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1)
 AppleWebKit/534.48.3 (KHTML, like Gecko) Version/5.1 Safari/534.48.3,gzip(gfe)
Message-ID: <ef701212-4630-4027-a6b7-7fdb55f1bf6e@o9g2000vbo.googlegroups.com>
Subject: Re: how to get instance variables in another action in rails 3
From: Frederick Cheung <frederick.che...@gmail.com>
To: "Ruby on Rails: Talk" <rubyonrails-talk@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable



On Sep 19, 3:15=A0pm, Colin Law <clan...@googlemail.com> wrote:
> On 19 September 2011 14:06, subbarao <subbarao....@gmail.com> wrote:
>
> > Yes if i use catching in my application view the size limit exceeding
>
> What do you mean catching? =A0If you mean the rails caching then there
> is no size limit.

Depends on the store - for example memcache won't store anything
larger than 1Mb
It might be preferable to store the objects that are slow to fetch
rather than the view itself, for example

@friends =3D Rails.cache.fetch("friends_for_#{session[:fbuser]
["credentials"]["token"]}") do
  graph =3D Koala::Facebook::GraphAPI.new(session[:fbuser]
["credentials"]["token"])
  graph.get_connections("me", "friends").to_a
end


Fred
>
> > . even
> > I tried with passing these values throw params[:var] argument also fail=
ing
> > Too large http request error.
> > I also tried with Class variables to store data like @@graph and @@frie=
nds
> > but no use those variables not at all storing data. any other way pleas=
e.
>
> Yes, the ways I suggested, in a file, database, possibly using the
> rails caching to help. =A0Have you read the guide?
>