Iteration I4: Adding a Sidebar, More Administration
Let’s start with adding links to various administration functions to the sidebar in the layout and have them show up only if a :user_id is in the session:
| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>Pragprog Books Online Store</title> |
| <%= csrf_meta_tags %> |
| |
| <%= csrf_meta_tags %> |
| |
| <%= stylesheet_link_tag 'application', media: 'all', |
| 'data-turbolinks-track': 'reload' %> |
| <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> |
| </head> |
| |
| <body class="<%= controller.controller_name %>"> |
| <div id="banner"> |
| <%= image_tag 'logo.svg', alt: 'The Pragmatic Bookshelf' ... |
Get Agile Web Development with Rails 5, 1st Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.