Hi all,
I''m new at rails, so maybe my problem is very stupid.
I''ve used act_as_authenticated to generate a login/logout/signup
controllers and it all works fine.
However, I''ve put both views login and logout into a partial inside my
main layout.
My problem is that these partials need to be loaded by the layout, and
I don''t know how to call the previously default actions
(''login'' and
''logout'' of my controller) when i submit the forms (the login
is
represented as a form).
I really appreciate your help,
hugo
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
could you be more precise ? I can speculate... you can call controller methods in a view: <% controller.the_method(some_variable,some_other) %> -- marcel On 26 Mai, 20:31, hpacheco <hpach...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all, > > I''m new at rails, so maybe my problem is very stupid. > > I''ve used act_as_authenticated to generate a login/logout/signup > controllers and it all works fine. > > However, I''ve put both views login and logout into a partial inside my > main layout. > > My problem is that these partials need to be loaded by the layout, and > I don''t know how to call the previously default actions (''login'' and > ''logout'' of my controller) when i submit the forms (the login is > represented as a form). > > I really appreciate your help, > hugo--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I got it, my problem was the call of the login/logout action. I know do <%= start_form_tag :controller => ''conta'', :action => ''login'' -%> ... The next step is to try to do it using ajax, so i just refresh the partials, not the entire page. hugo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hugo Pacheco wrote:> I got it, my problem was the call of the login/logout action. > > I know do > > <%= start_form_tag :controller => ''conta'', :action => ''login'' -%> > ... > > The next step is to try to do it using ajax, so i just refresh the > partials, not the entire page. > > hugoTens que fazer isso com o remote_form_tag, e depois usas rjs para fazer render das várias partials, ve se te safas com esta explicação. you must try remote_form_tag -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---