class User < ActiveRecord::Base
def self.authenticate_unsafely(user_name, password)
find(:first, :conditions => "user_name = '#{user_name}' AND password = '#{password}'")
...
Ruby On Is there better way to writ...
by dive.myopenid.com,
June 22, 2009 19:13
Also put your attention to ...
Ruby On Decoding a json object whil...
by dive.myopenid.com,
June 22, 2009 19:01
Adam is the man, once again...
Ruby On Iterating An Array - Need t...
by dive.myopenid.com,
June 22, 2009 18:59
maybe have something like
...
def upgrade_and_restart @myvocabulary.upgrade nextmyvocabulary = Myvocabulary.draw(current_user.id, params[:position], @myvocabulary.vocabulary.lesson.proficiency.id) ...
Ruby shorten long variable names...
by dive.myopenid.com,
June 22, 2009 18:52,
5 refactorings, tagged with rails, models, variable names
I wonder how you make a lin...
Ruby On While loop to get unique value
by dive.myopenid.com,
January 22, 2009 14:13
nice nice nice thank you al...
def before_create_save(record)
vouchercode = generate_vouchercode(8)
while Voucher.find(:first, :conditions => {:vouchercode => vouchercode})
...
Ruby While loop to get unique value
Coming from python, I would...
@Johannes, thx, but I think...