| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
closes #8388
|
|\
| |
| | |
Format routes as html on debug page
|
|/
|
|
|
|
|
|
|
| |
When someone gets a routing exception, the routes are rendered (starting in Rails 4.0). This PR brings parity between the html routes in the `rails/info/routes` path and when rendered from an exception. This is the continuation of #8521 which brought html formatted routes.
In addition to bringing parity to the two views, we're keeping our views DRY by rendering off of the same partials. In this case Railties depends on partials provided by ActionDispatch. I'm open to alternative implementations. Ideally both views will use the same code so any improvements or updates to it will be reproduced on both.
<hr />
![](http://f.cl.ly/items/3O1D0K1v0j0i343O3T3T/Screen%20Shot%202012-12-17%20at%203.07.20%20PM.png)
|
|\
| |
| | |
AR supporting new int4range and int8range data type on PostgreSQL >= 9.2. Fix #8528 pull request
|
| |
| |
| |
| | |
Fix realization
|
|\|
| |
| | |
AR supporting new int4range and int8range data type on PostgreSQL >= 9.2
|
| | |
|
|\ \
| | |
| | | |
HTML formatting to Rails::InfoController#routes
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This PR adds formatting and meta-data to the display of the internal routes. Users can now toggle between showing helpers with the `_path` or _`url` suffix.
There are multiple ways to achieve this, this method uses partials for formatting and meta-data. The partials can be re-used when rendering `routing_error.erb`, though that will need to be in a separate PR.
![](http://f.cl.ly/items/3A2p3c1T1t2f2X2R2K2S/Screen%20Shot%202012-12-12%20at%202.28.01%20PM.png)
ATP Railties
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The conditional_layout? method is not for public use and doesn't
actually do what the documentation suggested it does. It's actually
used to determine whether or not to use the explicit layout definition
defined in a controller or use the implicit layout definition.
Also documentation was added for the action_has_layout? method which
acts as a master switch for disabling the layout for the current
action. This method was added so that action caching didn't depend
on accessing layout internals but is also used by third-parties,
most notably the [Hobo][1] application.
[1]: https://github.com/hobo/hobo
|
|\ \ \
| | | |
| | | | |
Add nodoc to AS::BasicObject [ci skip]
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Add missing requires to core_ext/integer/time
|
|/ / / |
|
|\ \ \
| |/ /
|/| | |
DebugExceptions `File.join` => `File.expand_path`
|
| | | |
|
| |/
|/|
| |
| |
| | |
Somehow this got lost in my PRs before. I'm going to re-check all the
guides to make sure this didn't happen again elsewhere.
|
|\ \
| | |
| | | |
Properly deprecate AS::BasicObject without breaking subclasses of it
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
absence of attributes.
Add `ActiveModel::Errors#add_on_present` method. Adds error messages to present attributes.
|
|\ \ \
| | | |
| | | | |
Remove blank lines from generated Gemfile
|
|/ / /
| | |
| | |
| | | |
Introduced by 059bdc3415b0f1fb436c56a399a41b90fe3e87f0
|
| | | |
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | | |
Conflicts:
actionpack/lib/action_view/helpers/form_helper.rb
railties/lib/rails/info_controller.rb
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This reverts commit d1e70cb7b410f5151b08af9b38b2d6d80c1c61c2.
|
| | |
| | |
| | |
| | | |
This reverts commit 2f0311d79af01dc59ab3bd95cd6a56511258f917.
|
| | |
| | |
| | |
| | | |
This reverts commit db9b619f2851d7aeef9b239f6c19d0076faf5909.
|
| | |
| | |
| | |
| | | |
This reverts commit e5f8b2be64a74ce05e7c8b873d3e795e7bc68df5.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 6e72099a382c9731c7b40aa1b10237318e31ac92.
Reason: Feel that this isn't the right place.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Since Rails 3.1, change method is preferred for writing
migrations. Updated the example, because that command
would generate migration with change method.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
https://github.com/lifo/docrails/commit/55a2820cc6d33e96b8d1b64b38b033913058dce4
messes up
https://github.com/lifo/docrails/commit/cfd324b4b68469ba3188e4b7ba8586e59b239693
Hopefully there is other stuff lost in translation...
|
| | |
| | |
| | |
| | | |
application.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't use:
* Time.time_with_datetime_fallback
* Time.utc_time
* Time.local_time
|
| | |
| | |
| | | |
It's no longer necessary to delete public/index.html for the root route to take effect.
|
| | |
| | |
| | | |
# :nodoc: the rails/info_controller
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
I was slightly overzealous when removing this before.
Identified here: https://github.com/rails/rails/commit/ed78770b1a13788a5d3fcae484f34654de580bd5\#commitcomment-2281181
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|