2020-03-27から1日間の記事一覧
こういうのです。 Rails.env.production? # Rails.env == "production" と同じ ActiveSupport::StringInquirer クラスを使います。 role = ActiveSupport::StringInquirer.new("admin") role.admin? #=> true ActiveSupport::StringInquirer activesupport/l…
こういうのです。 Rails.env.production? # Rails.env == "production" と同じ ActiveSupport::StringInquirer クラスを使います。 role = ActiveSupport::StringInquirer.new("admin") role.admin? #=> true ActiveSupport::StringInquirer activesupport/l…