Skip to content

Commit

Permalink
Removed answered_questions code (#9235)
Browse files Browse the repository at this point in the history
* removed answered_questions code

* fixed codeclimate
  • Loading branch information
Manasa2850 committed Feb 25, 2021
1 parent b6ac6ca commit ac9c85e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
2 changes: 0 additions & 2 deletions app/controllers/tag_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ def show_for_author

@notes = nodes.where('node.nid NOT IN (?)', qids) if @node_type == 'note'
@questions = nodes.where('node.nid IN (?)', qids) if @node_type == 'questions'
ans_ques = Answer.where(uid: @user.id, accepted: true).includes(:node).map(&:node)
@answered_questions = ans_ques.paginate(page: params[:page], per_page: 24)
@wikis = nodes if @node_type == 'wiki'
@nodes = nodes if @node_type == 'maps'
@title = "'" + @tagname.to_s + "' by " + params[:author]
Expand Down
8 changes: 0 additions & 8 deletions test/functional/tag_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -558,14 +558,6 @@ def setup
assert_equal selector.size, 1
end

test 'should list answered questions' do
tag = tags(:question)

get :show_for_author, params: { id: tag.name, author: 'jeff' }

assert_not_nil assigns(:answered_questions)
end

test 'should take node type as note if tag is not a question tag for show_for_author' do
tag = tags(:awesome)

Expand Down

0 comments on commit ac9c85e

Please sign in to comment.