【发布时间】:2014-12-26 06:33:22
【问题描述】:
我尝试使用 user_signed_in? (宝石设计)在 app/assets/templates/index.html.slim
我的代码:
- 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 method 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
【问题讨论】:
标签: ruby-on-rails angularjs devise slim-lang