Class: Answers::QuestionsController
Instance Method Summary
collapse
#after_sign_in_path_for, #redirect_to_back
Instance Method Details
#index ⇒ Object
8
9
10
11
12
13
|
# File 'app/controllers/answers/questions_controller.rb', line 8
def index
add_breadcrumb "Answers", answers_path
@questions = Question.all
respond_with(@questions)
end
|
#show ⇒ Object
15
16
17
18
19
20
|
# File 'app/controllers/answers/questions_controller.rb', line 15
def show
add_breadcrumb "Answers", answers_path
add_breadcrumb @question.text, answer_path(@question)
render locals: { question: @question, similar_questions: @question.similar(limit:3) }
end
|