Hi -- On Wed, 21 Jan 2009, Mohammad Abed wrote:
> > This is line 8 > "elseif current_user.id.to_s == params[:user_id]" > > And here is the code form the start of the file to the end of the index > method. > > class GalleriesController < ApplicationController > #before_filter :require_user, :only => [:new, :create, :edit, :update, > :destroy] > > def index > > if params[:user_id].blank? > @galleries = Gallery.find(:all) > elseif current_user.id.to_s == params[:user_id] > @galleries = current_user.galleries One way or another, current_user is returning nil. So you'd have to track that down and fix it, or work around not having a current user in this action. David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: http://www.rubypal.com Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2) http://www.wishsight.com => Independent, social wishlist management! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

