by fadhli
on 02. Jun, 2008
in Programming, Rails
I was running the functional test and didn’t realize it was sending actual emails from my data fixtures. However, I did learn how to globally set the email settings so not to send the emails out during tests. If you want to use this, create a file called global_email_settings.rb (or whatever you want to name [...]
by asyraf
on 28. May, 2008
in Programming, Rails, Ruby On Rails, Tutorials, web2.0
I got a little lazy (well, a lot really… ) so i decided that i didn’t want to study Rails by reading, but by watching a video with a popcorn in hand (really hard to get good popcorn these days) searching through the web for video tutorials, I came across this set of videos from [...]
by fadhli
on 22. May, 2008
in Programming, Ruby, Ruby On Rails
Instead of writing this Profile.find(:all).collect{ |x| x.email } I could write this using Rails’ Symbol#to_proc Profile.find(:all).collect(&:email) Nice.
by fadhli
on 22. May, 2008
in Ruby On Rails
This morning while I was looking at some codes, I’ve found something interesting. When I login, I looked at the logs and I could see clearly the password that I’d just entered. Example Parameters: {“commit”=>”Log in”, “action”=>”create”, “controller”=>”sessions”, “password”=>”password123″, “login”=>”foobar”} I know, this looks like a trivial matter but imagine anyone having access to our [...]
by fadhli
on 22. May, 2008
in Programming, Rails
Instead of writing this [sourcecode language='ruby'] Profile.find(:all).collect{ |x| x.email } [/sourcecode] I could write this using Rails’ Symbol#to_proc [sourcecode language='ruby'] Profile.find(:all).collect(&:email) [/sourcecode] Nice.
by fadhli
on 22. May, 2008
in Programming, Rails
This morning while I was looking at some codes, I’ve found something interesting. When I login, I looked at the logs and I could see clearly the password that I’d just entered. Example [sourcecode language="ruby"] Parameters:{“commit”=>”Log in”, “action”=>”create”,”controller”=>”sessions”, “password”=>”password123″,”login”=>”foobar”} [/sourcecode] I know, this looks like a trivial matter but imagine anyone having access to our [...]
by asyraf
on 12. May, 2008
in Programming, Rails, Ruby, Ruby On Rails, web2.0
Finally, part 2 of the Ruby Cheatsheet is now complete! Click here to download the file from Scribd, which, by the way, is also an excellent site for lots of stuff… so kudos to the Scribd crew… Part two gets you acquainted with the built-in stuff ruby provides to make your coding life easier and [...]
by fadhli
on 08. May, 2008
in Ruby
[sourcecode language='ruby']puts ‘Hello World’[/sourcecode]
by asyraf
on 07. May, 2008
in Cheatsheets, Ruby, Ruby On Rails
For all us Ruby on Rails newbies, it’s really important to know Ruby, the language, before jumping into Rails. Learning Rails without knowing Ruby is like doing bike stunts without learning how to ride. Major pain bro… Save yourselves from major cranial meltdown by learning Ruby syntax first. It shouldn’t be too hard if you [...]