You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great gem, but I have some questions that aren't super obvious from the ReadMe:
If I call normalize_attribute a second time on the same attribute, does it remove the first normalization or add to it?
normalize_attribute(:title, with: [:blank])
normalize_attribute(:title, with: [:strip]) # does this remove :blank ?
# or is it the same as doing this: normalize_attribute(:title, with: [:blank, :strip])
In my brief testing, it DID remove the previous one.
Second question, is there a remove a normalization after it has already been added?
For example, if a parent class has a normalization you don't want in the child class. normalize_attribute(:title, with: [:blank, :strip]) # how to remove :strip ?
The text was updated successfully, but these errors were encountered:
Great gem, but I have some questions that aren't super obvious from the ReadMe:
If I call normalize_attribute a second time on the same attribute, does it remove the first normalization or add to it?
In my brief testing, it DID remove the previous one.
Second question, is there a remove a normalization after it has already been added?
For example, if a parent class has a normalization you don't want in the child class.
normalize_attribute(:title, with: [:blank, :strip]) # how to remove :strip ?
The text was updated successfully, but these errors were encountered: