Note that there are some explanatory texts on larger screens.

plurals
  1. USDon Graziano
    primarykey
    data
    text
    plurals
    1. COThats Kinda similar to what I was thinking. It seems that using something like `property :role, Enum[ :client, :worker, :manager ]` would basically give me what you described in one line. My understanding is that something can only be _one_ Enum at a time. _(ie. `user.role = :worker` would overwrite whatever the current value of :role)_ Whereas a `Flag` can hold any of the defined values as a property. I get `Enum`, but I don't understand the relationships of `Flag` _(ie. How would one set & unset particular values of `Flag`? *(can they be unset once set?)* )_
      singulars
    2. COThanks that actualy helped alot. For some reason it just wasn't clicking from reading the Docs and other people's examples. I'm just haveing one last problem. Let's say that each model also has a name value, tree_name, apple_name, seed_name. I would like to be able to find by that name. ie. `Tree.get('Wanda')` but if I add `:key, => true` to tree_name `Tree.get('Wanda')` tells me attribute error 1 for 2. `Tree.get(1, 'Wanda')` returns `< @Id = 1, @tree_name = "Wanda">`. I read te Docs and thought that adding the `:key, => true` could be added to any property to make it a key value.
      singulars
    3. COIdeally, I would like to be able have something like `.client?` and have that return `true` or `false`. So that I can do something like `if @ura.client?`. _(I'm fine with figuring out the code for that on my own, I'm just trying to get a handle on the best way to represent that information.)_
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload