0
我試圖使用user_signed_in? (寶石色器件)在app /資產/模板/ index.html.slim如何添加user_signed_in?在模板angularjs
我的代碼:
- unless user_signed_in?
li ng-click='login()'
a href='javascript:void(0)' translate='user.sign_in'
li ng-click='register()'
a href='javascript:void(0)' translate='user.sign_up'
- else
li
a href=profile_path(current_user.id)
它顯示錯誤: 「underfine方法user_signed_in」
信息路線
destroy_user_session_path DELETE /users/sign_out(.:format) sessions#destroy
login_by_token_path GET /users/login_by_token/:token(.:format) api/v1#api_user2
user_password_path POST /password(.:format) front/passwords#create
new_user_password_path GET /password/new(.:format) front/passwords#new
cancel_user_registration_path GET /cancel(.:format) front/registrations#cancel
user_registration_path POST / front/registrations#create
new_user_registration_path GET /sign_up(.:format) front/registrations#new