This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Country < ActiveRecord::Base | |
| has_many :places_to_visits | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PlacesToVisit < ActiveRecord::Base | |
| belongs_to :country | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Country < ActiveRecord::Base | |
| has_many :places_to_visits | |
| define_index do | |
| indexes name, | |
| :sortable => true | |
| indexes about | |
| indexes rating_no | |
| indexes capital | |
| indexes places_to_visits(:name), :as => :place, :sortable => true | |
| has continent_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Country.search params[:search], :with => {:rating_no => 5..10} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Country(params[:search], :match_mode => :all, | |
| :field_weights => {:name => 20, :about => 10}, | |
| :with => {:rating_no => 5..10 }, | |
| :conditions => { :continent_id => 1}, | |
| :page => params[:page], :per_page => 3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Country.search ‘India | USA’, :match_mode => :boolean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function setup(){ | |
| tinyMCE.init({ | |
| browsers : "msie,gecko,safari,chrome,opera", | |
| cleanup_on_startup : true, | |
| convert_fonts_to_spans : true, | |
| mode : 'textareas', | |
| onchange_callback : 'myCustomOnChangeHandler', | |
| plugins : "inlinepopups,safari,curblyadvimage,paste", | |
| theme : 'advanced', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
| <title>Google Maps JavaScript API v3 Example: Marker Animations Loop</title> | |
| <link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" /> | |
| <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> | |
| <script type='text/javascript'> | |
| var directionDisplay; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
| <title>Google Maps JavaScript API v3 Example: Marker Animations Loop</title> | |
| <link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" /> | |
| <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> | |
| <script type='text/javascript'> | |
| // GLOBAL VARIABLES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
| <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
| <title>Google Maps JavaScript API v3 Example: Center of Geodesic Polyline</title> | |
| <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
| <script type="text/javascript" src="v3_gmaps_enhance.js"></script> | |
| <script type="text/javascript"> | |
| var EarthRadiusMeters = 6378137.0; // meters |