June 2025
Intermediate to advanced
488 pages
12h 27m
English
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><%= content_for(:title) || "Pragprog Books Online Store" %></title> |
| | <meta name="viewport" content="width=device-width,initial-scale=1"> |
| | <meta name="apple-mobile-web-app-capable" content="yes"> |
| | <meta name="mobile-web-app-capable" content="yes"> |
| | <%= csrf_meta_tags %> |
| | <%= csp_meta_tag %> |
| | |
| | <%= yield :head %> |
| | |
| | <%# Enable PWA manifest for installable apps (make sure to enable in |
| | config/routes.rb ... |
Read now
Unlock full access