I tried to write render in an action, but layout behavior is different, why?
def show
# assuming we have a partial in app/views/shared/_panel_show.html.erb
#render "shared/_panel_show" # have layout
#render "/shared/_panel_show" # without layout
#render "shared/panel_show" # Template is missing
#render :partial => "shared/panel_show" # without layout
render :partial => "/shared/_panel_show",:layout => "application" # have layout
end
I want to render a partial and follow controller layout.