diff --git a/app/views/shared/_question.html.haml b/app/views/shared/_question.html.haml index 4636b78d..c5513a2e 100644 --- a/app/views/shared/_question.html.haml +++ b/app/views/shared/_question.html.haml @@ -2,13 +2,13 @@ .media .media-body %h6.media-heading.text-muted.answerbox--question-user - = user_screen_name a.question.user + = user_screen_name q.user asked - = time_ago_in_words(a.question.created_at) + = time_ago_in_words(q.created_at) ago - - if a.question.answer_count > 1 + - if q.answer_count > 1 ยท - %a{href: show_user_question_path(a.question.user.screen_name, a.question.id)} - #{a.question.answer_count} answers + %a{href: show_user_question_path(q.user.screen_name, q.id)} + #{q.answer_count} answers %p.answerbox--question-text = a.question.content \ No newline at end of file diff --git a/app/views/user/questions.html.haml b/app/views/user/questions.html.haml index 1f7411c9..e9835732 100644 --- a/app/views/user/questions.html.haml +++ b/app/views/user/questions.html.haml @@ -6,8 +6,8 @@ .col-md-9.col-xs-12.col-sm-9 %h1.j2-lh= @title #questions - - @questions.each do |a| - = render 'shared/question', a: a + - @questions.each do |q| + = render 'shared/question', a: q #pagination= will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false