を使用してテンプレートが見つかりませんでした。私はテストアプリケーションにDevise 4.0(これは柔軟な認証ソリューションです)を追加しましたとてもうまくいっていました。しかし、私がインデックスビューでプロファイルを更新するオプションをコーディングしていたとき。Rails 4.2.4/React 0.14.6とDevise 4.0/babel-core 6.7.4/webpack 1.12.14
{:locale => [:en]、:formats => [:html]、:variants => []、:ハンドラのテンプレートプロファイル/アップデート、アプリケーション/アップデートが欠落しています。 => [:erb、:builder、:raw、:ruby、:jbuilder]}。検索される:* "/ Users/jalanya/Documents/dev/ruby/twitter-clone/app/views" * "/Users/jalanya/.rvm/gems/ruby-2.2.2/gems/devise-4.0.0/ app/views "
今のところ、私は" index.html.erb "という名前のフォルダビュー/プロファイルの下にしか表示されません。だから、私の質問は、私はアクション "プロファイル#更新"の別のビューテンプレートを追加する必要がありますか?もしそうなら、どうしたらいいですか?
あなたもテストしたいのであれば私はgithubで私のテストアプリケーションを持っています。私がこれまでに持っていたファイルを以下で見つけてください。
routes.rbを
Rails.application.routes.draw do
get 'profile' => 'profile#index'
post 'profile' => 'profile#update'
devise_for :users
root 'home#index'
end
profile_controller.rb
class ProfileController < ApplicationController
before_action :authenticate_user!
def index
end
def update
end
end
ビュー/プロファイル/ index.html.erb
<h2>Update profile</h2>
<%= form_tag "/profile" do %>
<div class="row">
<form class="col s12">
<div class="row">
<div class="input-field col s6">
<input name="first_name" id="first_name" type="text" class="validate">
<label for="first_name">First Name</label>
</div>
<div class="input-field col s6">
<input name="last_name" id="last_name" type="text" class="validate">
<label for="last_name">Last Name</label>
</div>
</div>
<div class="row">
<button type="submit" class="btn right">Save</button>
</div>
</form>
</div>
<% end %>
あなたのフィードバックをお知らせください。