Didn''t try it yet, but from what the API docs of ActionView and
ActionController say about the render command, you should be able to
just pass a hash:
from API:
You can pass local variables to sub templates by using a hash with the
variable names as keys and the objects as values:
<%= render "shared/header", { :headline =>
"Welcome", :person =>
person } %>
so try this:
page[:main].replace_html :partial => "liste", {:tags =>
@tags, :tag_pages => @tag_pages }
On 26 Mai, 18:52, jochen kaechelin
<giss...-Vg5pTm5GbeLoK6nBLMlh1Q@public.gmane.org>
wrote:> I have controller:
>
> def liste
> @tags_pages, @tags = paginate(:tags, :order => "tags
desc")
> end
>
> and a RJS-file (liste.rjs):
>
> page[:main].replace_html :partial => "liste", :object =>
@tags ?????
>
> and a RHTML-file (_liste.rhtml):
>
> <% for a in @tags %>
> <%= a.tag.downcase %>
> <% end %>
>
> I want to display a page with all tags in the database. Because
> there are a hundred of them I want'' to use pagination. But to use
> the RJS file I need @tags_pages AND @tags in it.
>
> How to manage this?
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---