Render Component
I was trying to put my login form on the home page and wanted to document the steps:
Put
<%= render_component :controller => "member", :action => "login", :layout => false, :params => { "member[login]" => "" } %>
in show.rhtml and have the layout turned off.
render (:layout=>false)
The above will not show any layout if placed in a function.
Also see:
# Renders the template for the action "goal" within the current controller
render :action => "goal"
# Renders the template for the action "short_goal" within the current controller,
# but without the current active layout
render :action => "short_goal", :layout => false
# Renders the template for the action "long_goal" within the current controller,
# but with a custom layout
render :action => "long_goal", :layout => "spectacular"
from ActionController/Base
Render component infinite loop
0 Comments:
Post a Comment
<< Home