1Introduction
2เตรียมเครื่อง
- 2.1RVM
- 2.2Ruby
- 2.3NVM (optional)
- 2.4NodeJS (optional)
- 2.5Text Editor
- Atom
- Sublime
- VSCode
- 2.6Postman / Hoppscotch
3Creating Ruby on Rails Project
4Folder structure
- 4.1.ruby-version
- 4.2.ruby-gemset (new)
- 4.3Gemfile & Gemfile.lock
- 4.4config folder
- config/database.yml
- config/Environments files
- 4.5app folder
- app/controllers/application_controller.rb
- app/models/application_record.rb
- 4.6อื่นๆ
5Ruby
- 5.1Numbers
- 5.2BigDecimal (Rails only)
- 5.3Strings
- 5.4Comment
- 5.5Print
- 5.6Object Methods
- 5.7Array
- 5.8Hash
- 5.9Blocks
- 5.10Modify Built-in Class
6Controllers for Beginner
- 6.1HTTP Request / Actions
- 6.2Static GET API
- Cross origin request (rack-cors)
- 6.3POST PUT DELETE for Static
7Models and Migration
- 7.1Creating Model
- 7.2Migrating Database
8Rails Console
- 8.1The power of Rails console
- 8.2Rails powered by Ruby is fun
9CRUD API ใช้งานได้จริง
- 9.1Review บทก่อนหน้า
- 9.2RESTful APIs
- 9.3API GET users
- 9.4API GET users/:id
- 9.5API POST /users create
- 9.6API PATCH /users/:id update
- 9.7API DELETE /users/:id destroy
- 9.8Resourceful routes
- 9.9สรุปบท CRUD API
10The Power of Scaffolding
- 10.1rails g scaffold
- 10.2Controller from scaffold
11Model Relationship
- 11.1ER Diagram
- 11.2Starting small project
- 11.3Scaffold APIs
- 11.4The Missing APIs
- 11.5Model’s Relationship
- 11.6Testing Model’s Relationship
- 11.7Add missing API
- 11.8อื่นๆเกี่ยวกับ API
12Sending Emails
- 12.1Action Mailer Basic
- 12.2Email Template Layouts
- 12.3Test sending email
13Errors Rescue
- 13.1Ruby Rescue
- 13.2(API) ApplicationController Rescue
- Error Class (StandardError)
- rescue_from
- 13.3Example Classes to rescue
14Authenticating API with JWT
- 14.1Devise Gem
- 14.2JWT for User model
- 14.3Session Controller
- 14.4Sign up API
- 14.5Sign in API
- 14.6User profile API (from JWT)
- 14.7Sign out API
15Model Validation
- 15.1Simple Presence Validation
- 15.2Validating Inclusion
- 15.3Validating Length
- 15.4Validate Numbers
- 15.5Custom Validation
16Active Record Query Interfaces
- 16.1Date query
- 16.2Where NOT
- 16.3Scope
- 16.4Scope with function
- 16.5Ordering
- 16.6Relationship Ordering
- 16.7Readonly Objects
- 16.8Querying Relationship
- 16.9Eager Loading
- n+1 query
- 16.10Selecting Fields to Query
- 16.11Calculations
- .count
- .sum
- .average
- .minimum
- .maximum
- Others
17Caching with Rails
- 17.1Installing Redis
- 17.2การ Config Cache Store on Rails
- 17.3Simple Key Caching
- 17.4Model Caching
18Upload File / Image
- 18.1Setup ActiveStorage
- 18.2Adding ActiveStorage to Model
- 18.3Adding Upload Image API
- 18.4Storage Location Config
- Disk Storage
- Amazon S3 Storage
- Google Cloud Storage
- AzureStorage
- ข้อควรระวัง
19Managing Status with State Machine
- 19.1Act as state machine (aasm)
- 19.2AASM Events
- 19.3AASM Callbacks
20Unit tests
- 20.1Using rails test
- 20.2Test Driven Development (TDD)
- 20.3Unit test with fixtures and
setupfeature
21Deploying Rails
- 21.1Requirements
- 21.2Setting New User in ubuntu
- 21.3Setting ubuntu for rails
- 21.4nginx passenger
- 21.5Cloning Project
- 21.6Config Nginx Passenger