Fix the enums writer methods

Previously, the writer methods would simply check whether the passed
argument was the symbol representing the integer value of an enum field.
Therefore, it was not possible to specify the numeric value itself but
the dynamically defined scopes generate where clauses relying on this
kind of values so a chained call to a method like `find_or_initialize_by`
would trigger an `ArgumentError`.

Reference #13530
Improve enum documentation

Add a mention about the automatic generation of scopes based on the
allowed values of the field on the enum documentation.
Merge pull request #13542 from robin850/issue-13530

Fix enum writers when using integers