Given not authorized user
Given open contest
When I visit http://codebrawl.com/contests/command-line-todo-lists/entries/new
I should not see 404 error
I think it's because of this line (entries_controller.rb):
@contest.not_found if @contest.has_entry_from?(current_user)
so if current_user == nil this method fails (contest.rb):
def has_entry_from?(user)
entries.where(:user_id => user.id).any?
end
I think it's because of this line (entries_controller.rb):
so if
current_user == nilthis method fails (contest.rb):