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

Email attachments in ruby & rails

1. Add ActionMailer configuration in environment.This configuration can be different for development and production.# Include your application configuration below# You can set two configurations sendmail as well as smtp# To use SMTP you need to provide your email account credentials# Sendmail is a unix package that needs to be installed and configured while # using … Continue reading Email attachments in ruby & rails

Spell Check in ruby and rails using BOSSMan

Wrong English is an often problem while developing any website product as it gives bad view to website user and thus does direct impact on product. BOSSMan is a ruby gem that interacts with yahoo web service and provides a simplest way to overcome such errors. Installation: gem sources -a http://gems.github.com gem install jpignata-bossman Apply … Continue reading Spell Check in ruby and rails using BOSSMan