enumerize icon indicating copy to clipboard operation
enumerize copied to clipboard

Enumerated attributes with I18n and ActiveRecord/Mongoid support

Results 17 enumerize issues
Sort by recently updated
recently updated
newest added

## Background In a Rails app, we typicall have model translations like this: ```yml en: activerecord: models: article: one: Article other: Articles ``` When using polymorphic relations, e.g. when specifying...

How to reproduce (there's a spec that demonstrates this) 1. Add an enumerized field that is an integer in the DB and a string in code. e.g. the user status...

After #228, `ActiveModel::MissingAttributeError` is swallowed in `_set_default_value_for_enumerized_attributes` method. As a result, it throws mysterious error when "real missing attribute error" occurred. I encountered this phenomena with ActiveRecord. ## Steps to...

Guys, I think that the way this library sets default values for enumerized attributes is wrong. I am referring to this part of [this method](https://github.com/brainspec/enumerize/blob/master/lib/enumerize/base.rb#L91): ```ruby if (!attr_value || attr_value.empty?)...

Hi, I reported [an issue](https://github.com/brainspec/enumerize/issues/430) related to boolean fields not being properly saved in PostgreSQL, as mentioned in the title. It has been resolved in [this PR](https://github.com/brainspec/enumerize/pull/433), but the fix...

Ensures Enumerize is agnostic to whether the key to a store accessor is a string or symbol. Re-opening https://github.com/brainspec/enumerize/pull/405 but with fix to not generate string objects with `#to_s` from...

This causes the `#becomes` patch to work when converting a subclassed **Enumerize**-enabled model into a non-**Enumerize** base model. (It was while adding Enumerize support to **[The Brick](https://github.com/lorint/brick)** that I'd seen...

Given an ActiveRecord class `Animal` which has a subclass `Cat`: ``` class Animal < ApplicationRecord end class Cat < Animal include Enumerize end ``` When a form for `Animal` is...

I have found some behavior changes as a result of updating from `2.7.0` to `2.8.0`. When assigning to a field using enum key, the value is no longer set, is...

TLDR: A configuration option to cause Enumerize to raise an error when a record with an invalid `enumerized` attribute would be very helpful! --- Hello! My team and I were...