The flash hash is a feature that allows a message to persist in the session until the next request. It is most commonly used to save a message, redirect the user to a new URL, and then display the message after the new page loads. It makes it easy for developers to provide friendly messages to the user after an operation is complete, such as “record created successfully.” After the next request, the message is cleared.
- [Instructor] The CRUD code that we've written…is not particularly user-friendly…whenever we successfully process a form…and redirect the user to another action.…A better user interface would be to display a status message…that says something like subject added successfully,…or subject updated successfully right after the redirect…once the user lands on the new page.…But as we saw earlier when we were examining…the request response cycle,…a redirect is actually a new request from the browser.…It's not dissimilar from typing in a url directly.…Any variables which were set…in the first request response cycle, before the redirect,…won't be available in the second request response cycle…after the redirect.…
This is a classic problem with HTMl…because HTML is a stateless environment.…It doesn't keep track of information from previous pages.…It submits a fresh request for each page.…But we can keep track of data between requests…by using cookies and sessions.…The basic idea is that when your browser goes to a website…
- Creating and configuring a new Ruby on Rails project
- Generating controllers and views
- Handling server requests
- Using different types of routes
- Rendering and viewing templates
- Generating migrations and models
- Creating, updating, and deleting records
- Finding records with queries
- Understanding relationship types
- Writing controllers for CRUD
- Working with layouts and helpers
- Managing application assets
- Building forms
- Validating data
- Authenticating users
Skill Level Beginner
1. What Is Ruby on Rails?
2. Get Started
3. Controllers, Views, and Dynamic Content
4. Databases and Migrations
5. Models and ActiveRecord
7. CRUD, REST, and Resourceful Routes
8. Controllers and CRUD
9. Layouts, Partials, and View Helpers
12. Data Validation
13. Controller Features
14. User Authentication
15. Improve the Simple CMS
Next steps1m 44s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.