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 example for contraint( :ip => XXXX) has an invalid regex #7479

Merged
merged 1 commit into from Aug 31, 2012
Merged

the example for contraint( :ip => XXXX) has an invalid regex #7479

merged 1 commit into from Aug 31, 2012

Conversation

eriko
Copy link
Contributor

@eriko eriko commented Aug 29, 2012

escape the '.'s  

@steveklabnik
Copy link
Member

It's not invalid, it just matches extra stuff too ;)

@eriko
Copy link
Contributor Author

eriko commented Aug 29, 2012

I suppose if you are getting ip address that match
constraints(:ip => /192.168.\d+.\d+/)
you have bigger issues but this is probably better.
constraints(:ip => /192.168.\d+.\d+/)

@steveklabnik
Copy link
Member

I'm being needlessly pedantic; I like this request.

@eriko
Copy link
Contributor Author

eriko commented Aug 29, 2012

I just noticed something the displayed version of the corrected one lacks the backslashes before the periods. If I edit the comment they are still there. Interesting.
I mostly reply because my comment seemed lacking.

@steveklabnik
Copy link
Member

Yes markdown is probably doing some escaping.

@schneems
Copy link
Member

👍 looks good to me, in the future you can submit changes to examples and comments to docrails http://weblog.rubyonrails.org/2012/3/7/what-is-docrails/ changes get auto accepted, and can be rolled back if not needed. Basically changing docs is encouraged and less risky than changing code, so docrails helps by removing the PR review process.

@eriko
Copy link
Contributor Author

eriko commented Aug 30, 2012

So should I move this over to docrails?

@steveklabnik
Copy link
Member

If you'd like. Someone (probably @fxn) will get around to reviewing it here as well. Docrails is more of a 'fast track' than a required place to go.

@fxn
Copy link
Member

fxn commented Aug 31, 2012

In!

fxn added a commit that referenced this pull request Aug 31, 2012
the example for contraint( :ip => XXXX) has an invalid regex
@fxn fxn merged commit d659406 into rails:master Aug 31, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants