giant robots smashing into other giant robots: Tell, Don't Ask
And now, a friendly message from your local Tell, don’t ask Department.
Example 1
Not so good:
<% if current_user.admin? %> <%= current_user.admin_welcome_message %> <% else %> <%= current_user.user_welcome_message %> <% end %>Better:
<%= current_user.welcome_message %>Example 2
Not…
-
jcblitz reblogged this from thoughtbot
-
dubstepcomments likes this
-
proxygear likes this
-
theredissue likes this
-
collegeimprovements likes this
-
mlafeldt likes this
-
pavankanwar likes this
-
tomohiro reblogged this from thoughtbot
-
sciencewithbabytoys likes this
-
kurioscreative likes this
-
bobcatkid15 likes this
-
yatmsu reblogged this from thoughtbot
-
matt-hudson likes this
-
juev likes this
-
cranekicksoftwar reblogged this from thoughtbot
-
edham-arief likes this
-
tannerwelsh likes this
-
devlogs likes this
-
pure-blogging reblogged this from thoughtbot
-
clementstreet likes this
-
jonnyjohannes likes this
-
fholgado likes this
-
domon likes this
-
collettiquette reblogged this from thoughtbot
-
collettiquette likes this
-
devbootcamp reblogged this from thoughtbot
-
davidhua likes this
-
oreillymedia reblogged this from thoughtbot and added:
Tell, Don’t Ask And now, a friendly message from your local Tell, don’t ask Department. Example 1 Not so good:
-
wishinoo likes this
-
tayu-tau reblogged this from thoughtbot
-
thegraceface likes this
-
cannonade likes this
-
nonowarn likes this
-
huanhuan likes this
-
gene-r-smith likes this
-
slushyash likes this
-
redrory reblogged this from thoughtbot
-
redrory likes this
-
oivoodoo likes this
-
karekinian reblogged this from thoughtbot and added:
You should probably read this if you’re a developer
-
i-accidentally-another-url reblogged this from thoughtbot and added:
Ooh, Ruby examples.
-
t195 likes this
-
i-accidentally-another-url likes this
-
liquidzoot reblogged this from thoughtbot and added:
Smell that code.
-
liquidzoot likes this
-
khannz likes this
-
thoughtbot posted this



