Brendan Brewster wrote: > Hi, > > > def authenticate > return unless session[:user_id].nil? > authenticate_or_request_with_http_basic do |username, password| > user = User.first(:conditions => ['username like ? and password like > ?', username, password]) > if user > session[:user_id] = user.id > redirect_to root_path > true > else > false > end > end > end >
Hi Brendan, I had indeed seen that railscasts episode. It helped, but didn't say anything about the redirection. As far as your suggested code, it was exactly what the doctor ordered! Thanks for your help. I understand this a little better now. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

