Action View Layout and Partial

Topics 

  • Templates 
  • Layouts 
  • Partials 
    • Passing local variables
    • Rendering collections

Templates 

Action View and Templates 

  • Action View contains default templating system called ERB 
  • You can use other templating system such as Haml 
    • Add “haml-rails” gem to Gemfile 
  • Template file name convention 
    • name
    • locale (optional) 
    • content type 
    • templating system (templating engine) 
  • Example template files
    • index.html.erb
    • show.html.haml

You must have an active subscription to download PDF and Lab Zip of this course topic.Please click the "Subscribe" button or the "Login" button if you already have an account.