elz: (ancestor)
[personal profile] elz2009-05-18 08:44 am
Entry tags:

Model-view-controller: what goes where

In a Rails application, most of your code is divided into three main sections: the models, the controllers, and the views. Which code goes where is one of those things that can be a little confusing when you're getting started with Rails.

MVC FTW? )
elz: (shh)
[personal profile] elz2009-04-21 02:27 pm

Blocks for beginners

Blocks are tricky to wrap your brain around and hard to explain, but they're very, very useful, so you'll probably have to tackle them sooner or later.

Read more... )
elz: (farewell sunnydale)
[personal profile] elz2009-04-18 11:32 am

Symbols!

Symbols in Ruby are the things that start with colons: :name, :muffins, :buffy_the_vampire_slayer. They can be a little tough to wrap your brain around (they confused the heck out of me for a while), so I thought I'd do a rundown.

mmm, :muffins )
elz: (sisko)
[personal profile] elz2009-04-16 08:39 pm

Instance variables in Ruby and Rails

I was trying to explain this to someone earlier while doing a couple other things and was making a muddle of it. So here's a somewhat-more-coherent explanation:

instance variables, class variables, Batman, Spock and cloning )

Let me know if you have any questions, additions or corrections!