Rails+Devise+Bootstrapでアプリを作っているのですが、ログインに失敗(パスワード不正など)のときのエラー表示がされません。正確にはFlashMessageはalertとして出ているがメッセージ本体がでない状態です。
関係あるかわかりませんが、
devise/sessions.css Failed to load resource: the server responded with a status of 404 (Not Found)
というメッセージも出ているようです。
これは何が悪いのでしょうか?どなたかご存じの方よろしくお願いします。
【追記】
該当箇所のソースです。コントローラーはDeviseのソースそのままです。
/app/views/devise/sessions/new.html.slim
= stylesheet_link_tag params[:controller], :media => "all" div#main.sign_in .container h1 = @test h2 | Log in = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| h3 = devise_error_messages! dl.field dt = f.label :email dd = f.email_field :email, autofocus: true dl.field dt = f.label :password dd = f.password_field :password, autocomplete: "off" - if devise_mapping.rememberable? div.field = f.check_box :remember_me = f.label :remember_me .actions = f.submit "Log in" = render "devise/shared/links"
.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/devise-4.2.0/app/controllers/devise/sessions_controller.rb
class Devise::SessionsController < DeviseController prepend_before_action :require_no_authentication, only: [:new, :create] prepend_before_action :allow_params_authentication!, only: :create prepend_before_action :verify_signed_out_user, only: :destroy prepend_before_action only: [:create, :destroy] { request.env["devise.skip_timeout"] = true } # GET /resource/sign_in def new self.resource = resource_class.new(sign_in_params) clean_up_passwords(resource) yield resource if block_given? respond_with(resource, serialize_options(resource)) end
あなたの回答
tips
プレビュー