1
を持っているかなり確信している時にテンプレートエラーがありません:ルビー - 私はこのルートを持っている私は、テンプレート
scope :module => :mobile, :as => :mobile do
constraints(:subdomain => /m/) do
devise_for :users, :path => "", :path_names =>
{ :sign_in => "login", :sign_out => "logout",
:sign_up => "signup" },
:controllers => {:sessions => "mobile/sessions"}
resources :home
resources :disclosures # Will have new, get, look up a disclosure
end
end
と、このコントローラ:
class Mobile::SessionsController < ApplicationController
def create
end
end
と、このディレクトリの下:/app/views/mobile/sessions/new.html.haml
これはnew.html.hamlファイル内のコードです。
= content_for :page_title do
= t :page_title_login
= content_for :primary_content do
#login_box
.span6
#traditional-login
.span4
= content_for :before_closing_body_tag do
configure_login_form(#{request.xhr?.to_s.downcase});
しかし、私がログインした後、私はブラウザにこのエラーが表示されます。
Missing template mobile/sessions/create, application/create with {:locale=>[:en, :en], :formats=>[:html], :handlers=>[:haml, :erb, :builder]}. Searched in: * "/Users/alexgenadinik/projects/cmply/cmply-app/app/views" * "/Library/Ruby/Gems/1.8/gems/ckeditor-3.6.3/app/views" * "/Library/Ruby/Gems/1.8/gems/kaminari-0.13.0/app/views" * "/Library/Ruby/Gems/1.8/gems/devise-2.0.4/app/views"
システムは、私がnew.html.hamlファイルを持っていないことを考えると私に示唆しています。しかし、私は明らかにそのファイルを持っています。だから私は問題が何であるか分かりません。私は間違って何をしたのでしょうか?
ありがとうございます!
感:) – GeekedOut
の多くは、実際に私はそれをやった後、エラーが発生しまし作ること、ありがとうございました。たぶん私の場合、私はroot_urlにリダイレクトするはずがありませんでした。 root_urlはどこに定義されていますか?私はuser_homeなどにリダイレクトする必要があります。私は熊手を実行しましたが、パスのどれもが、私は私のすくいルートであるmobile_homeパスのようなものに行く必要があるだろうroot_url – GeekedOut
ように見えませんが、私はそれを行うとき、私のようなエラーが出る:未定義のローカル変数やメソッド 'mobile_homeを'for# –
GeekedOut