Ruby on Rails初心者です。
初めに、application.html.erbにて
<!DOCTYPE html>
<html>
<head>
<title><%= full_title(yield(:title)) %></title>
<%= stylesheet_link_tag 'application', media: 'all',
'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
<%= render 'layouts/shim' %>
</head>
<body>
<%= render 'layouts/header' %>
<div class="container">
<%= yield %>
<%= render 'layouts/footer' %>
</div>
</body>
</html>
を表示させたいところ、サーバーを起動させるとfull titleが定義されていないと出ました。
その後、apllication_helper.rbにて
module ApplicationHelper
def full_title(page_title)
base_title = "Score share"
if page_title.empty?
base_title
else
"#{base_title} | #{page_title}"
end
end
end
をして、これをapplication_controller.rbに
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
include ApplicationHelper
end
にしたところ、サーバーを起動すると、
Template is missing
Missing partial layouts/_shim with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in: * "/Users/KOSUKE/.rvm/gems/ruby-2.2.1/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates" * "/Users/KOSUKE/workspace/score_share/app/views" * "/Users/KOSUKE/.rvm/gems/ruby-2.2.1/gems/web-console-2.0.0.beta3/app/views"
と表示されてしまいました。
どうすれば解決されるでしょうか?
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。