diff --git a/app/controllers/answer_controller.rb b/app/controllers/answer_controller.rb index b37fcaef..8a2734a0 100644 --- a/app/controllers/answer_controller.rb +++ b/app/controllers/answer_controller.rb @@ -1,5 +1,6 @@ class AnswerController < ApplicationController def show @answer = Answer.find(params[:id]) + @display_all = true end end diff --git a/app/views/shared/_answerbox.html.haml b/app/views/shared/_answerbox.html.haml index bb916e92..4ccafe3d 100644 --- a/app/views/shared/_answerbox.html.haml +++ b/app/views/shared/_answerbox.html.haml @@ -20,13 +20,17 @@ %p.answerbox--question-text = a.question.content .panel-body - %p= a.content[0..255] - - if a.content.length > 255 - [...] - %br/ - Answer too long to display. - %a{href: show_user_answer_path(a.user.screen_name, a.id)} - Read the entire answer + %p + - if @display_all.nil? + = a.content[0..255] + - if a.content.length > 255 + [...] + %br/ + Answer too long to display. + %a{href: show_user_answer_path(a.user.screen_name, a.id)} + Read the entire answer + - else + = a.content - if @user.nil? .row .col-md-6.col-sm-4.col-xs-7.text-left.text-muted