Home  >  Q&A  >  body text

ruby - 关于rails中devise登录用户名的调用问题

我用devise进行了注册,这个时候登录的用户名如何传到首页的尾部script中?

这后面应该怎么取值?

高洛峰高洛峰2710 days ago613

reply all(1)I'll reply

  • 巴扎黑

    巴扎黑2017-04-24 09:12:31

    before_action :verified_student
    
      private
      def verified_student
        authenticate_student!
      end

    Here, authenticate_student will create a current_student, pointing to the current login student in students

    reply
    0
  • Cancelreply