September 2016
Intermediate to advanced
488 pages
12h 21m
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>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' ... |
Read now
Unlock full access