Verbally explain the following concepts:
role = "admin"
def add_admin user, role
user.role = role
end
add_admin kyle, "user"
- What is
user.role
equal to? Why? - What does it mean for a method to "return" a value?
- What's the difference between a hash and an array?
- When should you use map? Select? Reduce? Find?
- What's the difference between a class and an instance of a class?
- What's the difference between an instance method and a class method?
- What is a gem? Gemfile? Gemfile.lock?
- What is a one to many relationship? Many to many?
- How does a database relate 2 tables?
- What does "single source of truth" mean in terms of related objects?
- What is the purpose of the environment.rb file?