Skip to content

Instantly share code, notes, and snippets.

View Prav92's full-sized avatar

PraveenKumar Prav92

  • Spritle Software
  • Chennai,Tamil Nadu,India
  • X @Prav2k
View GitHub Profile
def self.search_007(query, lat, lon, offset, limit, options={})
if options.values.compact.any?
return search_007b(query, lat, lon, offset, limit, options)
end
if lat.nil? || lon.nil?
return search_007x(query, offset, limit)
end
def self.sort_by_top_search_algorithm current_user, orig_lat, orig_lon
p "sort_by_top_search_algorithm =----------------------------------=--=-==-=-=opklkklkl"
healthcare_provider_list =[]
if orig_lat != 0.0 && orig_lon != 0.0
nearby = self.having("distance <= 25")
others = self.having("distance > 25 && distance <= 100")
else
nearby = []
if(AdMob) AdMob createBanner({
adId:admobid.banner,
position:AdMob.AD_POSITION.BOTTOM_CENTER,
autoShow:true
});
var admobid={}
if( /(android)/i.test(navigator.userAgent) ) {
admobid = { // for Android
banner: 'ca-app-pub-xxxxx/xxxxx',
interstitial: 'ca-app-pub-xxxxxx/xxxxxx'
}
}
else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {
admobid = { // for iOS
banner: 'ca-app-pub-xxxxxxx/xxxxxxx',
class Education < ActiveRecord::Base
has_many :degrees
end