aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | remove Mass Assignment reference from Form Helpers guide [ci skip]Francesco Rodriguez2012-12-101-1/+1
| | | |
| * | | remove Mass Assignment reference from Security Guide [ci skip]Francesco Rodriguez2012-12-101-1/+0
| | | |
| * | | Document adding member route without the optionFlorent Guilleux2012-12-101-1/+3
| | | |
| * | | Add multipart: true to form for file upload.Steve Klabnik2012-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I was slightly overzealous when removing this before. Identified here: https://github.com/rails/rails/commit/ed78770b1a13788a5d3fcae484f34654de580bd5\#commitcomment-2281181
| * | | `config.action_mailer.async` is no longer usedAndy Lindeman2012-12-101-1/+0
| | | |
| * | | repeating documentation for form helpersThiago Pinto2012-12-091-18/+406
| | | |
| * | | Add quotes to Numeric Passwords to force string(sqlserver)Gaurish Sharma2012-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have numeric password for your database, like below: ```yaml development: adapter: mysql2 encoding: utf8 database: myblog_development pool: 5 username: root password: 123456 ``` you will get the following obscure error with unhelpful stack-trace ```shell /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': can't convert Fixnum into String (TypeError) from /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:444:in `new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:454:in `checkout_new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:425:in `acquire_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:362:in `block in checkout' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `checkout' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:271:in `block in connection' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:270:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:545:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:79:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:53:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/railtie.rb:153:in `block in <class:Railtie>' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `instance_exec' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `run' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:55:in `block in run_initializers' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:54:in `run_initializers' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:216:in `initialize!' from /home/gaurish/code/repo/rails/railties/lib/rails/railtie/configurable.rb:30:in `method_missing' from /tmp/numericpass/config/environment.rb:5:in `<top (required)>' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require_environment!' from /home/gaurish/code/repo/rails/railties/lib/rails/commands.rb:70:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' ``` Looking [Can't convert fixnum to string during rake db:create](http://stackoverflow.com/questions/3765834/cant-convert-fixnum-to-string-during-rake-dbcreate), it seems lot of people have faced the same error. so adding a note informing about numeric passwords seems like a good idea
| * | | Add quotes to Numeric Passwords to force string(jdbcmysql)Gaurish Sharma2012-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have numeric password for your database, like below: ```yaml development: adapter: mysql2 encoding: utf8 database: myblog_development pool: 5 username: root password: 123456 ``` you will get the following obscure error with unhelpful stack-trace ```shell /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': can't convert Fixnum into String (TypeError) from /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:444:in `new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:454:in `checkout_new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:425:in `acquire_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:362:in `block in checkout' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `checkout' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:271:in `block in connection' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:270:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:545:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:79:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:53:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/railtie.rb:153:in `block in <class:Railtie>' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `instance_exec' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `run' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:55:in `block in run_initializers' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:54:in `run_initializers' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:216:in `initialize!' from /home/gaurish/code/repo/rails/railties/lib/rails/railtie/configurable.rb:30:in `method_missing' from /tmp/numericpass/config/environment.rb:5:in `<top (required)>' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require_environment!' from /home/gaurish/code/repo/rails/railties/lib/rails/commands.rb:70:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' ``` Looking [Can't convert fixnum to string during rake db:create](http://stackoverflow.com/questions/3765834/cant-convert-fixnum-to-string-during-rake-dbcreate), it seems lot of people have faced the same error. so adding a note informing about numeric passwords seems like a good idea
| * | | Add quotes to Numeric Passwords to force string(jdbcpostgresql)Gaurish Sharma2012-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have numeric password for your database, like below: ```yaml development: adapter: mysql2 encoding: utf8 database: myblog_development pool: 5 username: root password: 123456 ``` you will get the following obscure error with unhelpful stack-trace ```shell /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': can't convert Fixnum into String (TypeError) from /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:444:in `new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:454:in `checkout_new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:425:in `acquire_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:362:in `block in checkout' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `checkout' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:271:in `block in connection' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:270:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:545:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:79:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:53:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/railtie.rb:153:in `block in <class:Railtie>' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `instance_exec' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `run' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:55:in `block in run_initializers' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:54:in `run_initializers' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:216:in `initialize!' from /home/gaurish/code/repo/rails/railties/lib/rails/railtie/configurable.rb:30:in `method_missing' from /tmp/numericpass/config/environment.rb:5:in `<top (required)>' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require_environment!' from /home/gaurish/code/repo/rails/railties/lib/rails/commands.rb:70:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' ``` Looking [Can't convert fixnum to string during rake db:create](http://stackoverflow.com/questions/3765834/cant-convert-fixnum-to-string-during-rake-dbcreate), it seems lot of people have faced the same error. so adding a note informing about numeric passwords seems like a good idea
| * | | Add quotes to Numeric Passwords to force string(MySql)Gaurish Sharma2012-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have numeric password for your database, like below: ```yaml development: adapter: mysql2 encoding: utf8 database: myblog_development pool: 5 username: root password: 123456 ``` you will get the following obscure error with unhelpful stack-trace ```shell $ c /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': can't convert Fixnum into String (TypeError) from /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:444:in `new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:454:in `checkout_new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:425:in `acquire_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:362:in `block in checkout' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `checkout' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:271:in `block in connection' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:270:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:545:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:79:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:53:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/railtie.rb:153:in `block in <class:Railtie>' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `instance_exec' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `run' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:55:in `block in run_initializers' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:54:in `run_initializers' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:216:in `initialize!' from /home/gaurish/code/repo/rails/railties/lib/rails/railtie/configurable.rb:30:in `method_missing' from /tmp/numericpass/config/environment.rb:5:in `<top (required)>' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require_environment!' from /home/gaurish/code/repo/rails/railties/lib/rails/commands.rb:70:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' ``` Looking [Can't convert fixnum to string during rake db:create](http://stackoverflow.com/questions/3765834/cant-convert-fixnum-to-string-during-rake-dbcreate), it seems lot of people have faced the same error. so adding a note informing about numeric passwords seems like a good idea
| * | | Add quotes to Numeric Passwords to force string(Postgres)Gaurish Sharma2012-12-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have numeric password for your database, like below: ```yaml development: adapter: mysql2 encoding: utf8 database: myblog_development pool: 5 username: root password: 123456 ``` you will get the following obscure error with unhelpful stack-trace ```shell $ c /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `connect': can't convert Fixnum into String (TypeError) from /home/gaurish/.rvm/gems/ruby-1.9.3-p286-perf/gems/mysql2-0.3.11/lib/mysql2/client.rb:44:in `initialize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `new' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:16:in `mysql2_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:444:in `new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:454:in `checkout_new_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:425:in `acquire_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:362:in `block in checkout' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `checkout' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:271:in `block in connection' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:270:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:545:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:79:in `retrieve_connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/connection_handling.rb:53:in `connection' from /home/gaurish/code/repo/rails/activerecord/lib/active_record/railtie.rb:153:in `block in <class:Railtie>' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `instance_exec' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:30:in `run' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:55:in `block in run_initializers' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:150:in `block in tsort_each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component' from /home/gaurish/.rvm/rubies/ruby-1.9.3-p286-perf/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each' from /home/gaurish/code/repo/rails/railties/lib/rails/initializable.rb:54:in `run_initializers' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:216:in `initialize!' from /home/gaurish/code/repo/rails/railties/lib/rails/railtie/configurable.rb:30:in `method_missing' from /tmp/numericpass/config/environment.rb:5:in `<top (required)>' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require' from /home/gaurish/code/repo/rails/railties/lib/rails/application.rb:190:in `require_environment!' from /home/gaurish/code/repo/rails/railties/lib/rails/commands.rb:70:in `<top (required)>' from script/rails:6:in `require' from script/rails:6:in `<main>' ``` Looking [Can't convert fixnum to string during rake db:create](http://stackoverflow.com/questions/3765834/cant-convert-fixnum-to-string-during-rake-dbcreate), it seems lot of people have faced the same error. so adding a note informing about numeric passwords seems like a good idea
| * | | Globalize2 is only compatible with Rails 2 so link to Globalize3 insteadHenare Degan2012-12-091-1/+1
| | | |
| * | | use default_options= instead of default to avoid confusionFrancesco Rodriguez2012-12-091-1/+1
| | | |
| * | | Security Guide: removing Mass Assignment.Steve Klabnik2012-12-081-135/+0
| | | | | | | | | | | | | | | | | | | | | | | | Since mass assignment doesn't exist anymore, we don't need to discuss it. I checked with @fxn last night before making this change.
* | | | Remove unicode character encoding from ActiveSupport::JSON.encodeBrett Carter2012-12-143-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The encoding scheme (e.g. ☠ -> "\u2620") was broken for characters not in the Basic Multilingual Plane. It is possible to escape them for json using the weird encoding scheme of a twelve-character sequence representing the UTF-16 surrogate pair (e.g. '𠜎' -> "\u270e\u263a") but this wasn't properly handled in the escaping code. Since raw UTF-8 is allowed in json, it was decided to simply pass through the raw bytes rather than attempt to escape them.
* | | | Skip binary data with binds test for mysql2, fix buildCarlos Antonio da Silva2012-12-142-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Mysql2 doesn't support binds, which means no binds payload is set when logging, so the logic to render binary data differently here doesn't work. Introduced in 99d142a9375f9ba1960863b3cc745265aa9a14df.
* | | | Convert changelogs to 1.9 hash style and fix some formatting [ci skip]Carlos Antonio da Silva2012-12-146-44/+45
| | | |
* | | | Merge pull request #8514 from mmb/filter_blobAaron Patterson2012-12-143-1/+23
|\ \ \ \ | | | | | | | | | | Do not log the binding values for binary columns.
| * | | | Do not log the binding values for binary columns.Matthew M. Boedicker2012-12-143-1/+23
| | | | | | | | | | | | | | | | | | | | They tend to be large and not very useful in the log.
* | | | | Revert "Fix failing test in railties"Steve Klabnik2012-12-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6bdc04624dcc0f45aab93af42d00224f67da36d5. This has been reverted because https://github.com/rails/rails/commit/8554537e48d6ed18ef08cb3ac0a9da96ac3c5cd6
* | | | | Revert "Merge pull request #8499 from schneems/schneems/html-route-inspector"Steve Klabnik2012-12-143-51/+9
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ae68fc3864e99ab43c18fd12577744e1583f6b64, reversing changes made to 0262a18c7b0ab6f60fee842b3007388f9ffeb0fa. See here: https://github.com/rails/rails/pull/8499#issuecomment-11356417
* | | | remove a cache we do not needAaron Patterson2012-12-141-5/+1
| | | |
* | | | Merge pull request #8510 from thedarkone/thread_safety_improvementsAaron Patterson2012-12-1415-108/+101
|\ \ \ \ | | | | | | | | | | Thread safety improvements
| * | | | Replace some global Hash usages with the new thread safe cache.thedarkone2012-12-1415-108/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of the changes: * Add thread_safe gem. * Use thread safe cache for digestor caching. * Replace manual synchronization with ThreadSafe::Cache in Relation::Delegation. * Replace @attribute_method_matchers_cache Hash with ThreadSafe::Cache. * Use TS::Cache to avoid the synchronisation overhead on listener retrieval. * Replace synchronisation with TS::Cache usage. * Use a preallocated array for performance/memory reasons. * Update the controllers cache to the new AS::Dependencies::ClassCache API. The original @controllers cache no longer makes much sense after @tenderlove's changes in 7b6bfe84f3 and f345e2380c. * Use TS::Cache in the connection pool to avoid locking overhead. * Use TS::Cache in ConnectionHandler.
* | | | | Remove AR gem pushed by mistakeSantiago Pastorino2012-12-141-0/+0
| | | | |
* | | | | Merge pull request #8400 from matthewrobertson/has-many-through-counter-cacheCarlos Antonio da Silva2012-12-144-0/+21
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for has_many_through counter_cache bug Counter caches were not being updated properly when replacing has_many_through relationships.
| * | | | | Fix for has_many_through counter_cache bugMatthew Robertson2012-12-144-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes reported issue #7630 in which counter caches were not being updated properly when replacing has_many_through relationships
* | | | | | Improve the documentation of cache_if and cache_unlessRafael Mendonça França2012-12-141-4/+7
| | | | | |
* | | | | | Merge pull request #8497 from acapilleri/conditional_cacheRafael Mendonça França2012-12-143-31/+55
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | Removed :if / :unless conditions to fragment cache in favour of *cache_i...
| * | | | | Removed :if and :unless from fragment cache option in favour ofAngelo capilleri2012-12-143-31/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cache_if(condition, option, &block) and cache_unless(condition, option, &block). In the PR #8371 was introduced conditional options :if and :unless in the cache method. Example: <%= cache @model, if: some_condition(@model) do %> ... <%end%> This is a good feature but *cache_if* and and *cache_unless* are more concise and close to the standard of rails view helpers (ex: link_to_if and link_to_unless). Example: <%= cache_if condition, @model do %> ... <%end%>
* | | | | | Clear url helper methods when routes are reloadedAndrew White2012-12-144-0/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove all the old url helper methods when clear! is called on the route set because it's possible that some routes have been removed.
* | | | | | Revert "Clear url helpers when reloading routes"Andrew White2012-12-142-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't actually remove old url helper methods as they are defined in a different module. This reverts commit 96bcef947bf713b7d9fc88f26dff69f568111262. Conflicts: actionpack/CHANGELOG.md
* | | | | | Fix failing test in railtiesCarlos Antonio da Silva2012-12-141-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related to the HTML route inspector changes: ae68fc3864e99ab43c18fd12577744e1583f6b64
* | | | | | Add missing require.Rafael Mendonça França2012-12-133-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was trying to use those files without Rails and that require was missing.
* | | | | | Merge pull request #8432 from ↵Rafael Mendonça França2012-12-131-0/+130
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rmcastil/add_migration_example_to_each_association_type Add migration examples to Association Basics [ci skip]
| * | | | | | Add migration example to Association Basics [ci skip]Ryan Castillo2012-12-131-0/+130
| | | | | | |
* | | | | | | Merge pull request #8499 from schneems/schneems/html-route-inspectorSteve Klabnik2012-12-133-9/+51
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Output routes in :html format
| * | | | | | | Output routes in :html formatschneems2012-12-123-9/+51
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By formatting routes for different media (txt/html) we can apply optimizations based on the format. We can include meta-data in the HTML to allow a rich experience while rendering and viewing the routes. This PR shows route helpers as they are used with the `_path` extension, it also has a javascript toggle on the top to switch to `_url`. This way the developer can see the exact named route helper they can use instead of having to modify a base. This is one example of an optimization that could be applied. Eventually we can link out to guides for the different columns to better explain what helper, HTTP Verb, Path, and Controller#action indicate. We could even add a route search box that could allow developers to input a given route and see all of the routes that match it. These are stand alone features and should be delivered separately.
* | | | | | | Bring back helpers_path attr accessorCarlos Antonio da Silva2012-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is apparently used by the railtie to setup the app helpers paths correctly between initializers. I'll need to check it further.
* | | | | | | Merge pull request #8503 from siong1987/debugger-jrubyCarlos Antonio da Silva2012-12-131-0/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Don't include debugger gem if jruby is used since it doesn't work on jruby. [ci skip]
| * | | | | | | don't include debugger gem if jruby is used since it doesn't work on jruby.Teng Siong Ong2012-12-121-0/+2
| | | | | | | |
* | | | | | | | Refactor helpers code in Action Pack a bitCarlos Antonio da Silva2012-12-133-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Avoid calling class_eval when not needed * Remove helpers_path attr accessor, it's defined as a class attribute a few lines later * Avoid creating extra arrays when finding helpers, use flat_map and sort! * Remove not required refer variable when redirecting :back
* | | | | | | | Merge pull request #8500 from senny/8492_migrations_crash_on_specific_pathCarlos Antonio da Silva2012-12-134-1/+23
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Recognize migrations, in folders containing numbers and 'rb'
| * | | | | | | | recognize migrations, in folders containing numbers and 'rb'.Yves Senn2012-12-134-1/+23
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | Closes #8492
* | | | | | | | Merge pull request #8502 from arunagw/masterJeremy Kemper2012-12-121-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fixed duplicate test case name
| * | | | | | | | Fixed test names for generated_attribute_test.rbArun Agrawal2012-12-131-1/+1
|/ / / / / / / /
* | | | | | | | Merge pull request #8496 from ptn/link-AR-basics-guideSteve Klabnik2012-12-122-42/+186
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | Link to Active Record Basics guide [ci skip]
| * | | | | | | General refreshment of the Active Record Basics guidePablo Torres2012-12-122-42/+186
| |/ / / / / /
* / / / / / / Shush deprecation warning due to initializing a Migrator with migration ↵Jeremy Kemper2012-12-121-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | paths rather than migrations. Use Migrator.open(paths) instead. Thanks @rubys!
* | | | | | Remove deprecation message from Action PackCarlos Antonio da Silva2012-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related to the deprecation of Time.utc_time in favor of Time.utc, in 48583f8bf74d1cefefea3cd6591bd546a9eaff6c.