Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The second argument of normalizers are not required #9

Merged
merged 4 commits into from
Mar 19, 2011
Merged

The second argument of normalizers are not required #9

merged 4 commits into from
Mar 19, 2011

Conversation

sobrinho
Copy link
Contributor

@sobrinho sobrinho commented Feb 6, 2011

Allow calls like this:

AttributeNormalizer::Normalizers::BlankNormalizer.normalize('my string')

instead of:

AttributeNormalizer::Normalizers::BlankNormalizer.normalize('my string', {})

The second argument is optional now.

Cheers

From:

normalize_attributes :summary, :with => [ :strip, { :truncate => { :length => 12 } }, :blank ]

To:

normalize_attributes :summary, :strip => true, :truncate => { :length => 12 }, :blank => true
@sobrinho
Copy link
Contributor Author

Updated pull request to change DSL to be like ActiveModel validations

From:

normalize_attributes :summary, :with => [ :strip, { :truncate => { :length => 12 } }, :blank ]

To:

normalize_attributes :summary, :strip => true, :truncate => { :length => 12 }, :blank => true

@mdeering mdeering merged commit 603d70d into mdeering:master Mar 19, 2011
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.

2 participants