On Wed, Sep 11, 2013 at 6:00 PM, jmcguckin <mcguckin@gmail.com> wrote:
> In a controller action for 'show' is the following:
>
> render :layout => 'edit'
>
> Ok, there a layout for edit, basically it is the standard javascript
> includes, anti csfr stuff and 'yield'.
>
> Hmm, what's it yielding to? Which template is it yielding to? There are both
> 'edit.html.erb' and 'show.html.erb' templates.
Controller => show.html.erb => edit.html.erb
That's exactly it: edit.html.erb yields show.html.erb.
Both the layout and the view are templates but the view goes into the layout.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAM5XQnx65sac3tW5B3nYKx2FWCkoeguRD97M3y08EwUTWtePrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment