I have a table, contains ID (1, 2, 3, 4,) an Item (potion, Ether, Map,) and a description (heals, heals poison, shows location).
Now the name of the table is Bag. I want to change update the description for the map. This is what I did initially:
$ Bag.find(3) #<Bag id: 3, Item: "Map", Description: "Shows Location">
Now I wanted to update that Map Description, so I did:
$ bag.description = "Shows your location" #<SyntaxError: Syntax error, unexpected tCONSTANT, expecting $end>
So this perplexed me I then tried adding a variable:
$ b = Bag.find(3) #<Bag id: 3, Item: "Map", Description: "Shows Location"> $ b.Bag = "Shows you location" "Shows you location" $ b.save true
Now I am trying to understand this, I require a variable to tell the model to do something? I guess I am not certain of why I needed a variable. Is it always required when changing something in a datastore to add a variable for it?