← back to the blog
fousa tag
Current tag: tag
2010
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...
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...
Ruby script to check your website's response time // 1 comment
This is a small ruby script that you can use to check your server response time. It could come in handy when you want to use it to check your response time and analyze it. You can run the script you have to pass 2 arguments. The first on is the interval time (in seconds), and the second one is the website to check. > ./response 10 ...