Skip to content

Conversation

@tonymarklove-babylon
Copy link

When defining multiple attributes in a single attr_encrypted definition, all of the attributes should have methods such as "#{attr}_changed?" and "#{attr}_was" defined.

Currently only the last attribute is popped from the array, and methods for all other attributes are not created.

For example:

attr_encrypted :name, :email

email_was # => defined
email_changed? # => defined

name_was # => not defined
name_changed? # => not defined

When defining multiple attributes in a single `attr_encrypted` definition, all of the attributes should have methods such as `"#{attr}_changed?"` and `"#{attr}_was"` defined.

Currently only the last attribute is popped from the array, and methods for all other attributes are not created.

For example:

```
attr_encrypted :name, :email

email_was # => defined
email_changed? # => defined

name_was # => not defined
name_changed? # => not defined
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant