Rails offers many tools to assist us with date and time calculations as well as the formatting of dates and times for output. There are helpers to assist with time calculations and for outputting dates and times in a variety of custom formats.
- [Instructor] Ruby on Rails offers us many helpers…to assist with date and time calculations and formatting.…These methods aren't exactly helper methods,…like the other ones we've been looking at,…because these methods are available throughout Rails,…not just in our view templates.…These methods are additions that Rails makes…to Ruby's core classes.…Because they're available anywhere,…you can open up a Rails console to try them out.…Let's get an overview of what methods are available.…First, there's DateTime calculations using integers.…We just use an integer and then after it…we put a time period name like second, minute, hour, day,…week, month, year, and the plural form of all of those.…
This allows us to work with time by doing simple addition…and using English words.…So, for example, time.now plus 30.days minus 23.minutes.…Now, 30.days is actually being converted into…a certain number of seconds, 23.minutes is being converted…into a certain number of seconds,…and those are being added and subtracted…from time.now to adjust the time forward.…
- 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.