montera34 / pageonex

PageOneX. Analyzing front pages
http://pageonex.com
GNU Affero General Public License v3.0
54 stars 13 forks source link

thread list broken in production #139

Closed numeroteca closed 11 years ago

numeroteca commented 11 years ago

When going to http://production.pageonex.com/threads/ it gives an error in the logs:

ActionView::Template::Error (undefined method `admin' for #<User:0x00000003fd7fe8>):

Might be related to the migration that needs to be run.

elplatt commented 11 years ago

This is fixed for logged in users now. But if current_user is nil, it still breaks.

elplatt commented 11 years ago

Anywhere current_user.admin is checked, we first need to check to see if current_user.nil? is true. I can look at this Monday, but it should be a quick fix if anyone else has time.

numeroteca commented 11 years ago

It works locally for logged in and not logged in users, but doesn't work in de. It breaks for logged in users now.

Showing /var/www/pageonex/dev/app/views/threads/index.html.erb where line #39 raised: undefined method `admin' for #User:0x00000004d6a430