Dark Ambient
2006-Nov-15 16:52 UTC
Which ajax function do I need - updating a div when user is logged in ?
The part of the user logging in is all set up. I want to be able to update a div with a menu, based on the type of user (acl) who is logged in. Not sure which ajax function to use ? I''m thinking it wouldn''t work on the sign in form, but more on the success of the sign in. Stuart -- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Dark Ambient
2006-Nov-15 17:33 UTC
Re: Which ajax function do I need - updating a div when user is logged in ?
On 11/15/06, Dark Ambient <sambient-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > The part of the user logging in is all set up. I want to be able to > update a div with a menu, based on the type of user (acl) who is logged in. > Not sure which ajax function to use ?Set it up like this but not rendering , just spitting out the text of the js: controller: unless current_user.id == 0 render :update do |page| page.insert_html :bottom, ''subnav'', :partial => ''navigation'' end end navigation partial: <%= javascript_include_tag :defaults %> <% if @current_user_level == 1 %> <ul> <li..........................> <li>........................</li> # left out the menu options for this email </ul> <% end %> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---