Brett,

that was great!

Thanks,

   Jet

On Sep 2, 11:28 am, Brett Nelson <[email protected]> wrote:
> > - Any variables defined outside the part or attributes passed to the
> > overall tag are not available inside the part
>
> The way I deal with this is to build the part as a tag.  Here is an
> example:
>
> An example:
>
> In the controller
>       render :partial => "userproject", :object =>
> [...@new_projects,@selected_projects]
>
> The _userproject.dryml
>
> <%
>   @new_projects = userproject[0]
>   @selected_projects = userproject[1]
> %>
>
> <user-projects/>
>
> In the index.dryml
> ...
> <user-projects/>
> ...
>
> In application.dryml
>
> <def tag="user-projects">
>
>   <section part="userproject">
> ....
>         <%= link_to_remote( "dismiss all new projects",
>              :update => "userproject",
>              :loading  => "Hobo.showSpinner('Dismissing all...');",
>              :complete => "Hobo.hideSpinner();",
>              :confirm => "Deselect all new projects?",
>              :url => { :action => :rem_all } )
>         %>
> ...
>
> Then you just have to make sure that any variables the part needs are
> defined by @vars either in the controller method or in the dryml prior
> to part/defined tag being called.
>
> Brett
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to