मैं अपने application_controller.rbरूबी जब तक && बयान
def layout
unless request.subdomain.empty? && current_user.nil?
self.class.layout 'admin'
end
end
में निम्नलिखित यह इसके ऊपर कोड काम नहीं कर रहा लगता है। लेकिन जब मैं निम्नलिखित करता हूं, तो यह काम करता है।
def layout
unless request.subdomain.empty?
unless current_user.nil?
self.class.layout 'admin'
end
end
end
मैं कथन तक एक को हटाकर कोड को सरल बनाना चाहता हूं। ऐसा कैसे किया जा सकता था?
आप मैन हैं। अच्छा उत्तर... – jaydel