Action View Layout and Partial


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


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,Lab Zip and Recordings of this course topic.Please click the "Subscribe" button or the "Login" button if you already have an account.