Archive for August, 2007

Sunday, August 12th, 2007

Book Review: Pro Drupal Development

Book Site | Sample Chapter: The Theme System | Table of Contents
Many of you are aware of my current total infatuation with Ruby, and that I’ve
used PHP for about 6 years and at one point decided I hated PHP…until, I
needed it for a quick one-off page and then realized that PHP had its place.
Then again, [...]

1 Comment » - Posted in Drupal, PHP by nola

Friday, August 3rd, 2007

Beautiful Ruby: Learning the -isms

I did PHP for 6 years.... sometimes its hard not to do PHP in ruby...
Today i was testing a url to see if it contains a certain string:
PLAIN TEXT
RUBY:

response = Net::HTTP.get_response(URI.parse("http://myawesomesite")

if response.body.match("my awesome text") == nil  then

      return false

end

and remember to do:
PLAIN TEXT
RUBY:

response = Net::HTTP.get_response(URI.parse("http://myawesomesite")

return "false" if response.body.match("my awesome text").nil?

Another thing [...]

3 Comments » - Posted in Ruby, Uncategorized by nola