diff --git a/activestorage/test/fixtures/files/icon.svg b/activestorage/test/fixtures/files/icon.svg index 6cfb0e241eb80..901ec3488da7f 100644 --- a/activestorage/test/fixtures/files/icon.svg +++ b/activestorage/test/fixtures/files/icon.svg @@ -1,13 +1 @@ - - - - - - - - - - - - - + \ No newline at end of file diff --git a/guides/assets/images/association_basics/belongs_to.svg b/guides/assets/images/association_basics/belongs_to.svg index 61a4196542c42..6408211a3d25c 100644 --- a/guides/assets/images/association_basics/belongs_to.svg +++ b/guides/assets/images/association_basics/belongs_to.svg @@ -1,4 +1 @@ - - - -
authors
Model: Author

+ id : integer
+ name : string
books
Model: Book

belongs_to :author
+ id : integer
+ author_id : integer
+ published_at : datetime
Fig: belongs_to association
\ No newline at end of file +
authors
Model:Author

+ id :integer
+ name :string
books
Model:Book

belongs_to :author
+ id :integer
+ author_id :integer
+ published_at :datetime
Fig: belongs_to association
\ No newline at end of file diff --git a/guides/assets/images/association_basics/habtm.svg b/guides/assets/images/association_basics/habtm.svg index 63b6e8df7c8bc..600a22d4030df 100644 --- a/guides/assets/images/association_basics/habtm.svg +++ b/guides/assets/images/association_basics/habtm.svg @@ -1,4 +1 @@ - - - -
assemblies
Model: Assembly

has_and_belongs_to_many :parts
+ id : integer
+ name : string
assemblies_parts
+ assembly_id : integer
+ part_id : integer
parts
Model: Part

has_and_belongs_to_many :assemblies
+ id : integer
+ part_number : string
Fig: has_and_belongs_to_many association
\ No newline at end of file +
assemblies
Model:Assembly

has_and_belongs_to_many :parts
+ id :integer
+ name :string
assemblies_parts
+ assembly_id :integer
+ part_id :integer
parts
Model:Part

has_and_belongs_to_many :assemblies
+ id :integer
+ part_number :string
Fig: has_and_belongs_to_many association
\ No newline at end of file diff --git a/guides/assets/images/association_basics/has_many.svg b/guides/assets/images/association_basics/has_many.svg index bb85f38be25de..9251094237f2f 100644 --- a/guides/assets/images/association_basics/has_many.svg +++ b/guides/assets/images/association_basics/has_many.svg @@ -1,4 +1 @@ - - - -
Fig: has_many association
authors
Model: Author

has_many :books
+ id : integer
+ name : string
books
Model: Book

+ id : integer
+ author_id : integer
+ published_at : datetime
\ No newline at end of file +
Fig: has_many association
authors
Model:Author

has_many :books
+ id :integer
+ name :string
books
Model:Book

+ id :integer
+ author_id :integer
+ published_at :datetime
\ No newline at end of file diff --git a/guides/assets/images/association_basics/has_many_through.svg b/guides/assets/images/association_basics/has_many_through.svg index 31029a7dd3f83..286bbcf52445a 100644 --- a/guides/assets/images/association_basics/has_many_through.svg +++ b/guides/assets/images/association_basics/has_many_through.svg @@ -1,4 +1 @@ - - - -
Fig: has_many association
physicians
Model: Physician

has_many :appointments
has_many :patients, through: :appointments
+ id : integer
+ name : string
appointments
Model: Physician

belongs_to :physician
belongs_to :patient
+ id : integer
+ physician_id : integer
+ patient_id : integer
+ appointment_date : datetime
patients
Model: Patient

has_many :appointments
has_many :physicians, through: :appointments
+ id : integer
+ name : string
\ No newline at end of file +
Fig: has_many association
physicians
Model:Physician

has_many :appointments
has_many :patients, through: :appointments
+ id :integer
+ name :string
appointments
Model:Physician

belongs_to :physician
belongs_to :patient
+ id :integer
+ physician_id :integer
+ patient_id :integer
+ appointment_date :datetime
patients
Model:Patient

has_many :appointments
has_many :physicians, through: :appointments
+ id :integer
+ name :string
\ No newline at end of file diff --git a/guides/assets/images/association_basics/has_one.svg b/guides/assets/images/association_basics/has_one.svg index d6c0c3ddab7cf..d359c8a26fed3 100644 --- a/guides/assets/images/association_basics/has_one.svg +++ b/guides/assets/images/association_basics/has_one.svg @@ -1,4 +1 @@ - - - -
accounts
Model: Account

+ id : integer
+ supplier_id : integer
+ account_number : string
suppliers
Model: Supplier

has_one :account
+ id : integer
+ name : string
Fig: has_one association
\ No newline at end of file +
accounts
Model:Account

+ id :integer
+ supplier_id :integer
+ account_number :string
suppliers
Model:Supplier

has_one :account
+ id :integer
+ name :string
Fig: has_one association
\ No newline at end of file diff --git a/guides/assets/images/association_basics/has_one_through.svg b/guides/assets/images/association_basics/has_one_through.svg index b014e6c961902..5294a0094e021 100644 --- a/guides/assets/images/association_basics/has_one_through.svg +++ b/guides/assets/images/association_basics/has_one_through.svg @@ -1,4 +1 @@ - - - -
accounts
Model: Account

belongs_to :supplier
has_one :account_history

+ id : integer
+ supplier_id : integer
+ account_number : string
suppliers
Model: Supplier

has_one :account
has_one :account_history, through: :account
+ id : integer
+ name : string
account_histories
Model: AccountHistory

belongs_to :account
has_one :account_history

+ id : integer
+ account_id : integer
+ credit_rating : integer
Fig: has one through association
\ No newline at end of file +
accounts
Model:Account

belongs_to :supplier
has_one :account_history

+ id :integer
+ supplier_id :integer
+ account_number :string
suppliers
Model:Supplier

has_one :account
has_one :account_history, through: :account
+ id :integer
+ name :string
account_histories
Model:AccountHistory

belongs_to :account
has_one :account_history

+ id :integer
+ account_id :integer
+ credit_rating :integer
Fig: has one through association
\ No newline at end of file diff --git a/guides/assets/images/association_basics/polymorphic.svg b/guides/assets/images/association_basics/polymorphic.svg index ce4e749e8809b..68f8ce39c60e4 100644 --- a/guides/assets/images/association_basics/polymorphic.svg +++ b/guides/assets/images/association_basics/polymorphic.svg @@ -1,4 +1 @@ - - - -
employees
Model: Employee

has_many :pictures, as: :imageable
+ id : integer
+ name : string
products
Model: Product

has_many :pictures, as: :imageable
+ id : integer
+ name : string
pictures
Model: Picture

belongs_to :imageable, polymorphic: true

+ id : integer
+ name : string
+ imageable_id : integer
+ iamgeable_type : string
Fig: polymorphic association
\ No newline at end of file +
employees
Model:Employee

has_many :pictures, as: :imageable
+ id :integer
+ name :string
products
Model:Product

has_many :pictures, as: :imageable
+ id :integer
+ name :string
pictures
Model:Picture

belongs_to :imageable, polymorphic: true

+ id :integer
+ name :string
+ imageable_id :integer
+ iamgeable_type :string
Fig: polymorphic association
\ No newline at end of file diff --git a/railties/lib/rails/generators/rails/app/templates/public/icon.svg b/railties/lib/rails/generators/rails/app/templates/public/icon.svg index 04b34bf83f344..bc30772ff6942 100644 --- a/railties/lib/rails/generators/rails/app/templates/public/icon.svg +++ b/railties/lib/rails/generators/rails/app/templates/public/icon.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file