URLs can contain additional values in their query string. Ruby on Rails makes it easy to access these values inside controllers and view. It also makes it easy to add query parameters to URLs using the link_to helper method. It is important to remember that query parameters are always strings and need to be converted before using them as integers or other data types.
- [Instructor] In the last movie, we learned to create links…and how to specify the two most important parameters…for that link, the controller and the action.…But what if we want to send other parameters…in the URL string?…Perhaps we're browsing a multi-page list,…and we want to view only page five.…We need a way for the URL to indicate that it's page five,…and a way for the controller to be able…to read that value in and use it.…In this movie, we'll learn how to work…with URL parameters.…Remember that in HTML, URL parameters are…the portion of the URL to the right of the question mark.…
In this case, page equals three, name equals Kevin.…There are two additional parameters.…They're key value pairs separated by an ampersand.…That's just basic HTML.…The parameters object works a lot like a Ruby hash,…but with a few special features.…For one thing, it allows us to reference parameter values…using either a symbol or a string.…In normal Ruby, asking a hash for the symbol ID…would return something different…than asking for the string ID.…
- 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.