Not sure what is "Category.all" in your "each" enumerator.

Try this, assuming CACHE.featch 'all_categories' is returning an array of
sorts:


<% CACHE.fetch('all_categories').each do |category| %>
   <ul>
         <li><%= category.name <http://c.name/> %> </li>
    </ul>
<% end %>



On Thu, Sep 16, 2010 at 11:02 PM, badnaam <[email protected]> wrote:

> I am using memcached.. and have the folllowing in my partial.
>
> <%CACHE.fetch 'all_categories' do %>
> <ul>
> Category.all.each do |c|
> <li><%= c.name %> </li>
> end
> </ul>
> <%end %>
>
> When I check in the irb console the "all_categories" key does get
> populated.
> So..CACHE.fetch 'all_categories' in irb does output the expected html
> list.
>
> But nothing gets outputted in my view.
>
> I am guessing this is some sort of syntax error, what am I doing wrong?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>


-- 
Srikanth Shreenivas
http://www.srikanthps.com
@srikanthps

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to