yonbergman/enumify — pull request #11 by sullman (2014-07-24 21:22:48+00:00)
Title: Allow shorthand method and scope names to use a prefix.

Since the values of a particular field on a model may only make sense in the context of that field and not the model in general, it is sometimes not ideal that the enum value names are used unmodified for shorthand method names and scopes. Sometimes it's simply cosmetic (e.g. `model.error?` doesn't obviously suggest that it returns true if some particular field has the value of `error`). Other times it leads to collisions.

To address this, we allow a prefix to be specified for the shorthand method names and scopes of a particular field. Without the prefix, you may define:

```
enum :status, [:available, :canceled, :completed]
```

And then you'll have methods like `model.available?`. With the prefix, you may define:

```
enum :status, [:available, :canceled, :completed], :method_prefix => 'status'
```

And then you'll have methods like `model.status_available?`.