What does #self.included(base) do in Ruby on Rails' Restful Authentication?

后端 未结 5 1942
离开以前
离开以前 2021-01-30 03:50

I thought we would do

helper_method :current_user, :logged_in?, :authorized?

to make these controller methods available for use as helper metho

5条回答
  •  情话喂你
    2021-01-30 04:33

    Want to digger into self.included and self.extended ?

    Please look at here: https://ruby-doc.org/core-2.2.1/Module.html#method-i-included

提交回复
热议问题