Showing posts with label rubyonrails. Show all posts
Showing posts with label rubyonrails. Show all posts

Tuesday, January 08, 2008

Using custom rake tasks in your Rails build

With Rails you can create custom Rake tasks (I recommend reading RailsEnvy for a tutorial for rake tasks).

Once you've got your task you can use it in your Rails build by adding the following line to your Rakefile in the Rails base directory:

Rake::Task['namespace:your_rake_task'].invoke

Easy enough, but took me long enough to find it! Now when you run 'rake' in your rails projects, your custom tasks will be executed. Cool eh? Good for copying dependences and such.

Friday, August 10, 2007

Robbie on Rails part 3

What a difference a day makes. Eastmad and I were pairing and decided to leave the strange error behind us and move on. We collectively had one the most frustrating days in the office because of that problem on Wednesday. As we moved on, we started to build up momentum and really started to see results. We also had a little help from Kerry who managed to help us with our issue we had the previous day.

Turns out the validates_associates function doesn't really do what we had expected it to do, but by using the key function validates_on_create we were able to roll our own data restrictions.

I have to say, I really enjoyed coding in Rails yesterday, long may it continue =)

Wednesday, August 08, 2007

Robbie on Rails

The last few weeks I've been involved in a new project at work that invovles building a portal and we went and had a play with Ruby on Rails. So far, so good. I must confess that I like the way that your application is structured in Rails, it stops a lot of ambiguity and I'm a big fan of the MVC pattern which Rails uses everywhere. It's the first pattern learnt at university, so I suppose there's a fond place for me there kinda like how I shop at the supermarket I used to stack shelfs at when I was 17! lol.

I bought a few books on rails for the office and I'm a bit disapointed with one of the books which claimed to be "agile" and hasn't shown me how to write a test and I'm upto chapter 6.

On another note, I've been asked to do a rails brown bag at work, I may use what this book has taught me, but introduce tests.

hmmm