Work through Four Days on Rails (read all 7 entries…)
Finally finished day 3

My, there was a lot of work in day 3. Days 1 and 2 were deceivingly short, and then he goes and gives us all that to do in day 3! Luckily I’m not even trying to get it all done in 4 days, but if I get the 4th day done today I’ll have done it all in a week :)

I’m finding I’m developing my own notation standards. I do like putting brackets in, even though they’re not necessary. It shows me what I’m doing.

Eg.
render(:partial => ‘form’)
or
text_field(‘task’, ‘description’, :size => 40, :maxlength => 40)

Both of those two are on page 27 of the tutorial, and my notation is quite different, but it still works, and makes a lot more sense to me.

I’m slightly confused as to when you use double quotes and when you use single. Is there any logic? Does it actually matter?



Comments:

quote

I got sql error when I changed this to single quotes:
“OFFSET #{@item_pages.current.to_sql1}”

Okay.

So it does matter in some cases.

I thought of a notation that I might try … use single quotes when it’s one word, but use double quotes when there are multiple words (or commands) in the string. I guess I just have to try it and see if anything breaks!


 

I want to:
43 Things Login