Lone Star Ruby Conference 2010

DejaVu! You usually say that when you attend the same conference twice 😉 - At Lone Star, its always an new experience. Last year I was an attendee, this year I presented a talk and I thoroughly enjoyed myself. There were an awesome selection of talks and more importantly, the sequence of talks was thought … Continue reading Lone Star Ruby Conference 2010

Zipcode validation using geokit in rails

1.Install geokit gemgem install geokitOR # Add following line inside rails initialize blockRails::Initializer.run do |config| config.gem 'geokit'endAnd then run commandrake gems:install2. Consider User model with zipcode as attribute fieldinclude Geokit::Geocoders class User :zipcode private def request_zipcode_validation_using_geokit # Method request google api for location # if location found then zipcode is valid otherwise # add validation … Continue reading Zipcode validation using geokit in rails

ActionMailer SMTP settings in rails

1. Add following line to rails environment file ActionMailer::Base.delivery_method = :smtp2. Include your email authenticationCreate a ruby file called smtp_settings under config/initializers directory# config/initializers/smtp_settings.rbActionMailer::Base.smtp_settings = { :address => "smtp.gmail.com", :port => 587, :authentication => :plain, :enable_starttls_auto => true, :user_name => "replies@gmail.com", :password => "_my_gmail_password_"}noTE** Keep starttls_auto always true3. Create sample mailer in order to ensure … Continue reading ActionMailer SMTP settings in rails