Different ways to set attributes in Active record
Rails allow us to update attributes using different instance and class methods, understanding these methods allows us to avoid insane bugs. Let’s explore these methods attribute= Syntax: As you can see this is an instance method and the data is not written to the DB yet. we have to run x.save to save it. write_attribute…