'Can I determine which Ruby-on-Rails layout a view is rendered in?

I have a shared partial view that may be rendered in one layout, or in another.
One layout includes Bootstrap, the other does not.
So I'd like to programmatically determine inside the view which layout the shared view is being presented in.
Is this possible?

If not, I guess I will create a second partial view and use it when appropriate. The view is small enough that this won't be a big deal. But I am curious of there is any way to detect which layout is being used from inside a view. Maybe some view helper object I'm not thinking of right now, or similar?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source