I'm building a simple trivia app and am using bootstrap generators for my forms. In the new and update forms for my models, the model names aren't showing up in my views. Here's the code for app/views/questions/new.html.erb
:
<div class="page-header">
<h1>
<%=t '.title', :default => [:'helpers.titles.new', 'New %{model}'], :model => @model_name %>
</h1>
</div>
<%= render :partial => 'form' %>
Here's my questions_controller.rb
:
class QuestionsController < ApplicationController
...
def new
@model_name = Question.model_name.human
@question = Question.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @question }
end
end
...
private
def question_params
params.require(:question).permit(:body)
end
end
The word New
shows up in the view, but not the model name...
Anyone know what's going on here?
FWIW I tried this with 2.0 and 1.9.3 with the same results.