On Fri, Jan 20, 2012 at 4:41 PM, Colin Law <clan...@googlemail.com> wrote:

> On 20 January 2012 10:54, sachin kewale <sachinkew...@gmail.com> wrote:
> >
> >
> > On Fri, Jan 20, 2012 at 3:59 PM, Colin Law <clan...@googlemail.com>
> wrote:
> >>
> >> On 20 January 2012 10:20, sachin kewale <sachinkew...@gmail.com> wrote:
> >> > hi all,
> >> >   i have one issue after entering username and password on login popup
> >> > and
> >> > clicking login button the user is logged in but i have to refresh the
> >> > url
> >> >   i have check the log but nothing is there,i have set the session key
> >> > and
> >> > secret in 'session_store.rb',  i am running my local app on 127.0.0.1
> ip
> >> > on
> >> > 3006 port
> >>
> >> Without showing us the relevant code we have no hope of helping.  We
> >> have no idea of how you are handling login or what code is executed
> >> when the login button is clicked.
> >
> > i am using ruby 1.8.7 and rails version 2.3.11 with ruby gem 1.6.2 i am
> > setting the key and secret value in session_store.rb with following code
> >
> > ActionController::Base.session = {
> >   :key         => '_myapp',
> >   :secret      =>
> >
> '071a1167c4870bfff95a61835288f9fa9eb158298e1c5623e8d7223fa7a68c9d485b4e27a8e705c2485631bfc28f48b895c486536c8f53856ce3480f0d9ea8b'
> >   #:domain      => :all
> > }
> >
> > from my controller i using validate_user method
> >
> > def    validate_user
> > begin
> > [snipped some very complex code that I am not even going to attempt to
> understand]
>
> I think you had better have a look at the Rails Guide on Debugging.
> That will show you how to use ruby-debug to break into your code to
> inspect data and follow the flow.  Then you should be able to work out
> what is going wrong.
>
> I would also say that code looks incredibly complex and should be
> refactored to make it simpler.  Personally I would not even attempt to
> debug code as complex as this, but would refactor it into simpler
> chunks first, there is a good chance it will then work.  Sending email
> and rendering inside a method called validate_user, for example, is
> ridiculous (IMHO).
>
> Colin
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
hi colin,
   i debug the code(method) but method giving the right values.My problem
is that as i said when user logs in
   it is done in that method but i have to refresh the url to take the user
on to new page if it valid user.

--
Regards
Sachin

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to