0895 Learning Ruby On Rails
0895 Learning Ruby On Rails
#ruby-on-
rails
Table of Contents
About 1
Remarks 2
Versions 2
Examples 3
Create a new Rails app with your choice of database and including the RSpec Testing Tool 5
Generating A Controller 6
Installing Rails 9
Chapter 2: ActionCable 12
Remarks 12
Examples 12
app/assets/javascripts/channels/notifications.coffee 12
User Authentication 13
Chapter 3: ActionController 14
Introduction 14
Examples 14
Controllers (Basic) 14
Parameters 15
Redirecting 16
Using Views 16
404 when record not found 18
Filters 20
Generating a controller 22
Chapter 4: ActionMailer 25
Introduction 25
Remarks 25
Examples 25
Basic Mailer 25
user_mailer.rb 25
user.rb 25
approved.html.erb 26
approved.text.erb 26
Adding Attachments 26
ActionMailer Callbacks 27
ActionMailer Interceptor 34
Examples 36
Introduction 36
Sample Job 36
Introduction 37
Examples 37
Using a serializer 37
Chapter 7: ActiveJob 38
Introduction 38
Examples 38
Chapter 8: ActiveModel 39
Remarks 39
Examples 39
Using ActiveModel::Validations 39
Chapter 9: ActiveRecord 40
Examples 40
Creating A Migration 41
Create a table 41
Precedence 42
Introduction to Callbacks 43
Examples 46
belongs_to 46
has_one 46
has_many 47
Polymorphic association 47
Self-Referential Association 49
Optimistic Locking 50
Pessimistic Locking 50
Parameters 51
Remarks 51
Examples 51
Running migrations 55
Rollback migrations 56
Changing Tables 56
Redo migrations 58