How to I create a record in the database using activerecord?

See this test!
How do I use the activerecord join table relationship to create a user's new post?

see test.

keyword: shovel operator
Keyword: many-to-many relationship
How do I write a basic where method?

A where method is like a dude at a warehouse who's job it is to go and find things in that warehouse.  He usually gets a vague descirption, like 'the blue box' or 'every box that is blue.'  He brings a bucket full of every blue box in the warehouse. If you want your specific blue box, you must pick it out of the bucket yourself.

An activerecord relation returned by the where method is like the bucket mentioned above.
How do I write a basic update method?

the Activerecord update method is like a guy in a warehouse who's
job it is to take things out of boxes and replace them with new contents. You give him a list of identification numbers, and the contents of those boxes that are supposed to be replaced.  He takes that list, finds the box, and throws out the stuff he is supposed to throw out and puts in the stuff he is supposed to put in.