我嘗試檢查用戶是否連接,如果是日曆/指數 爲我的助手應用程序錯誤匹配
application_helper
創建2方法def check_user_signed
!user_signed_in?
end
def check_path_calendar
current_page?(:controller => 'calendars', :action => 'index')
end
我的路線文件
devise_for :users, path_names: {sign_in: 'login', sign_out: 'logout', sign_up: 'signup'}
resources :calendars
match 'calendars' => 'calendars#index', :as => 'calendars', :via => :get
#inforamtions
match "information" => 'home#information', :as =>'information', :via => :get
w ^母雞我試圖用我的用戶連接我得到一個錯誤
No route matches {:controller=>"devise/calendars"}
那麼你的'耙routes'說? – sameera207 2013-05-12 23:36:09