Tuesday, January 19, 2010

Generate random texts

Hi,
I have used this method to generate random texts ....

def rendom_password
chars = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a
newpass = ""
1.upto(7) { |i| newpass << chars[rand(chars.size-1)] }
end

Thanks,
sri

Wednesday, January 13, 2010

Select Helper Methods in Rails

Hi,

Whenever i use a select Box in Rails, i have used this link.. This s really useful..

http://shiningthrough.co.uk/Select-helper-methods-in-Ruby-on-Rails

Thanks,
Srikanth



Tutorials: Ruby on Rails 3 Tutorial: Learn Rails by Example | Ajax on Rails | Rails 3 Way, The (2nd Edition) (Addison-Wesley Professional Ruby Series)