fousa tag

Current tag: tag

2010

3 MAR

Sanitize order clause in ActiveRecord query

After some testing we came (me and JB) to the conclusion that it was not possible to inject hazardous SQL into the order statement. But if you don't want any injection at all you can still use this. I'm trying to dig a little deeper into this! This tutorial concerns Rails 2.x, I'll have to check whether I have to do this for Rails 3.x! I d...

26 FEB

Contact form validations with AR helpers

This is how you validate a contact form with the validation helpers used in ActiveRecord. This piece of code enables you to validate: presence of the name and content format of the website (example: http://www.fousa.be) format of the email address (example: test@fousa.be) value of the snow field (snow must be "cold") I also imple...

20 JAN

Clean URL's in Rails // 1 comment

Another great and awesome informational article by me! PROBLEM When you create a new model (for example Post) you'll also have a posts_controller. This controller will be called from following URL: /posts/. But because I like clean URL's, I prefer it to be called /blog/. SOLUTION What I certainly don't want to do is change the nam...

go to the top ↑ ← back to the blog