2021-06-27から1日間の記事一覧
実装 app/controllers/application_controller.rb class ApplicationController < ActionController::Base def current_site # @current_siteがnillであれば、Site.firstを代入する。 @current_site ||= Site.first end helper_method :current_site end こ…
実装 app/controllers/application_controller.rb class ApplicationController < ActionController::Base def current_site # @current_siteがnillであれば、Site.firstを代入する。 @current_site ||= Site.first end helper_method :current_site end こ…