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> |
| <meta name="viewport" content="width=device-width,initial-scale=1"> |
| <%= csrf_meta_tags %> |
| <%= csp_meta_tag %> |
| <%= stylesheet_link_tag "inter-font", "data-turbo-track": "reload" %> |
| <%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %> |
| |
| <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> |
| <%= javascript_importmap_tags ... |
Get Agile Web Development with Rails 7 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.