I have overriden show action of users controller, and when I rake it
gives me:

/vendor/plugins/community_engine/app/controllers/users_controller.rb:
20: You have a nil object when you didn't expect it! (NoMethodError)
That line is:
  uses_tiny_mce(:options => AppConfig.default_mce_options.merge
({:editor_selector => "rich_text_editor"}),
    :only => [:new, :create, :update, :edit, :welcome_about])
Next line is:
uses_tiny_mce(:options => AppConfig.simple_mce_options, :only =>
[:show])


In my app/controllers/users_controller.rb I have:
class UsersController < BaseController
  def show
    @friend_count               = @user.accepted_friendships.count
    @accepted_friendships       = @user.accepted_friendships.find
(:all, :limit => 5).collect{|f| f.friend }
    @pending_friendships_count  = @user.pending_friendships.count()

    @comments       = @user.comments.find(:all, :limit => 10, :order
=> 'created_at DESC')
    @photo_comments = Comment.find_photo_comments_for(@user)
    @users_comments = Comment.find_comments_by_user(@user, :limit =>
5)

    @recent_posts   = @user.posts.find(:all, :limit => 2, :order =>
"published_at DESC")
    @clippings      = @user.clippings.find(:all, :limit => 5)
    @photos         = @user.photos.find(:all, :limit => 5)
    @comment        = Comment.new(params[:comment])

    @my_activity = Activity.recent.by_users([[email protected]]).find
(:all, :limit => 10)

    # New content
    @new_content = NewContent.find_by_user_id(@user.id)

    update_view_count(@user) unless current_user && current_user.eql?
(@user)
  end
end

I have no other actions in app/controllers/users_controller.rb. Can
someone help?



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CommunityEngine" 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/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to