Requirements: Get coffee-script installed (refer above)
Ref: http://babinho.net/2011/05/autocomplete-fields-in-rails-3-1-with-jquery-ui/
To use this I had to download jquery-ui (http://jqueryui.com/download) and select Autocomplete
| { | |
| "total":81, | |
| "cities":[ | |
| {"id":1,"name":"Adana","d_count":15}, | |
| {"id":2,"name":"Ad\u0131yaman","d_count":9}, | |
| {"id":3,"name":"Afyonkarahisar","d_count":18}, | |
| {"id":4,"name":"A\u011fr\u0131","d_count":8}, | |
| {"id":5,"name":"Amasya","d_count":7}, | |
| {"id":6,"name":"Ankara","d_count":25}, | |
| {"id":7,"name":"Antalya","d_count":19}, |
| .bundle | |
| db/*.sqlite3 | |
| db/database.yml | |
| log/*.log | |
| log/*.pid | |
| .sass-cache/ | |
| tmp/**/* | |
| .rvmrc | |
| .DS_Store | |
| db-dumps |
| #Mails Settings | |
| config.action_mailer.default_url_options = { :host => 'localhost:3000' } | |
| config.action_mailer.delivery_method = :smtp | |
| config.action_mailer.smtp_settings = { | |
| :address => "smtp.gmail.com", | |
| :port => 587, | |
| :domain => 'gmail.com', | |
| :user_name => 'username', | |
| :password => 'password', | |
| :authentication => 'plain', |
| CREATE TABLE `countries` ( | |
| `id` int(11) NOT NULL auto_increment, | |
| `country_code` varchar(2) NOT NULL default '', | |
| `country_name` varchar(100) NOT NULL default '', | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=240 ; | |
| -- | |
| -- Dumping data for table `countries` | |
| -- | |
| INSERT INTO `countries` VALUES (1, 'US', 'United States'); |
Requirements: Get coffee-script installed (refer above)
Ref: http://babinho.net/2011/05/autocomplete-fields-in-rails-3-1-with-jquery-ui/
To use this I had to download jquery-ui (http://jqueryui.com/download) and select Autocomplete
| /** | |
| * Plugin Name: Autocomplete for Textarea | |
| * Author: Amir Harel | |
| * Copyright: amir harel ([email protected]) | |
| * Twitter: @amir_harel | |
| * Version 1.4 | |
| * Published at : http://www.amirharel.com/2011/03/07/implementing-autocomplete-jquery-plugin-for-textarea/ | |
| */ | |
| (function($){ |
| <!DOCTYPE html><html lang="en"><head><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><script src="http://1.2.3.4/bmi-int-js/bmi.js" language="javascript"></script><title>demo</title> <meta name="description" content="" /><meta name="generator" content="Studio 3 http://aptana.com/" /><meta name="author" content="amir" /><meta name="viewport" content="width=device-width; initial-scale=1.0" /><link rel="shortcut icon" href="/favicon.ico" /><link rel="apple-touch-icon" href="/apple-touch-icon.png" /><style type="text/css" style="display:none">ul.auto-list{display:none;position:absolute;top:0px;left:0px;border:1px solid green;background-color:#A3DF99;padding:0;margin:0;list-style:none;}ul.auto-list>li:hover,ul.auto-list>li[data-selected=true]{background-color:#236574;}ul.auto-list>li{border:1px solid gray;cursor:default;padding:2px;}mark{font-weight:bold;} | |
| </style> | |
| <style type="text/css">#ta{width:300px;height :100px;font-size:11px;font-family:"Helvetica Neue",Arial,sans-se |
| # create rvmrc file | |
| create_file ".rvmrc", "rvm gemset use #{app_name}" | |
| gem "haml-rails" | |
| gem "sass" | |
| # hpricot and ruby_parser required by haml | |
| gem "hpricot", :group => :development | |
| gem "ruby_parser", :group => :development | |
| gem "nifty-generators" | |
| gem "simple_form" |
| Loaded Taps v0.3.24 | |
| Auto-detected local database: mysql2://root:root@localhost/api-app_development?encoding=utf8 | |
| Warning: Data in the database 'mysql2://root:root@localhost/api-app_development?encoding=utf8' will be overwritten and will not be recoverable. | |
| ! WARNING: Potentially Destructive Action | |
| ! This command will affect the app: pigonws | |
| ! To proceed, type "pigonws" or re-run this command with --confirm pigonws | |
| > pigonws | |
| /home/muhammetdilek/.rvm/gems/ruby-1.9.3-p194/gems/sequel-3.20.0/lib/sequel/adapters/mysql2.rb:58: [BUG] Segmentation fault |
| /* | |
| Guncel BIN LISTESI | |
| twitter : http://twitter.com/tserpico | |
| */ | |
| SET FOREIGN_KEY_CHECKS=0; | |
| -- ---------------------------- | |
| -- Table structure for `binlist` | |
| -- ---------------------------- |