Updating ruby on rails


13-Oct-2019 07:31

Active Record was described by Martin Fowler in his book .In Active Record, objects carry both persistent data and behavior which operates on that data.So, for a class , you should have a database table called books.The Rails pluralization mechanisms are very powerful, being capable of pluralizing (and singularizing) both regular and irregular words.This is particularly true for ORM frameworks in general.However, if you follow the conventions adopted by Rails, you'll need to write very little configuration (in some cases no configuration at all) when creating Active Record models.Active Record takes the opinion that ensuring data access logic as part of the object will educate users of that object on how to write to and read from the database.

Thus, explicit configuration would be needed only in those cases where you can't follow the standard convention.

Understanding how relational databases work is crucial to understanding Active Records and Rails in general.