fousa blog

7 MAR

Heroku on Rails presentation on Barcamp

Yesterday I did a presentation on Heroku on my very first Barcamp Antwerp. And I like it a lot! So if you're interested in seeing my presentation, here it is! You can find my presentation on SlideShare, or embedded below. HerokuView more presentations from Jelle Vandebeeck. Have fun playing with Heroku!

5 MAR

Overwrite custom field errors in Rails3

When using form helpers in your form to display your textfield you always have to match your CSS style to match with the div's that are added by Ruby on rails when an error occurs. This is the form helper: f.text_field :title This is the generated tag with the error div surrounding it: <div class="fieldWithErrors"&...

4 MAR

For those who use Remember The Cat, I have some great news... It's back online and ready for your tasks! I migrated from Joyent to Heroku, and fixed a few bugs, I still hope to upgrade to the newest version of the framework in a short notice. I'll keep you posted!

3 MAR

Just added my recent code optimalisations for this website. Feel free to check them out on Github! And please don't wait to send my some updates if you think it can be coded more Rubyish!

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...

2 MAR

And a new barrier has been crossed. This website now runs the latest Ruby on Rails 3.0.0 beta. And I also took the jump and implemented the compatibility with Ruby 1.9.1. I can say this is a proud moment, after some hard issues!

1 MAR

Staging environment on Heroku

Sometimes you want to test your application on one of your production servers so you can let your clients test your application in real life! What I wanted to do is point the master branch to dev.testapp.com and the production branch to testapp.com. The subdomain dev.testapp.com is my staging environment where the clients can play with the ap...

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...

24 FEB

My Git integration with Terminal

The following scripts are added to my ~/.bash_profile for some Git integration. BRANCH AUTOCOMPLETION This piece of code autocompletes the branches when you press TAB. So "git checkout ma" and press TAB, will result in "git checkout master". _complete_git() { if [ -d .git ]; then branches=`git branch -a | cut -c 3-` tags=`git ta...

23 FEB

I really can't wait to order my iPad... Still one month to go though! I started some tryout development, and it's really cool! Especially since I have some small experience in iPhone development! Code wise it's almost the same... Go Apple, and release the damn thing!

go to the top ↑ Check out the archive →