There are many helper methods to assist with outputting and formatting of numbers. Learn how to use number_to_currency, number_to_percentage, number_with_precision, number_with_delimiter, number_to_human, number_to_human_size, and number_to_phone.
- [Voiceover] In this movie,…we'll take a look at the helpers…that Rails provides to help us to output numbers.…There're seven main helpers…to help you format numbers for display.…And I've arranged them in roughly the order…that I think you're going to use them.…There's number_to_currency, number_to_percentage,…number_with_precision, number_with_delimiter,…number_to_human, number_to_human_size, number_to_phone.…And in number_with_precision and number_with_delimiter,…which are the two that don't follow the pattern…of having number_to, they start with number_with.…They have aliases as well.…
Which is number_to_rounded and number_to_delimited.…That's to try and bring them into line.…Number_with is the older names…that have been there since the beginning of Rails.…The newer names are aliases…and you can feel free to use either one of them.…All of these helper methods…take a number as their first argument…and then a hash of options as their second argument.…You only need to provide the hash of options…if you wanna overwrite the Rails defaults.…
- 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?
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.