| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is an alternative implementation to #7771 thanks to the advice of @spastorino
Rails is a dynamic framework that serves a static index.html by default. One of my first questions ever on IRC was solved by simply deleting my public/index.html file. This file is a source of confusion when starting as it over-rides any set "root" in the routes yet it itself is not listed in the routes. By making the page dynamic by default we can eliminate this confusion.
This PR moves the static index page to an internal controller/route/view similar to `rails/info`. When someone starts a rails server, if no root is defined, this route will take over and the "dynamic" index page from rails/welcome_controller will be rendered. These routes are only added in development. If a developer defines a root in their routes, it automatically takes precedence over this route and will be rendered, with no deleting of files required.
In addition to removing this source of confusion for new devs, we can now use Rails view helpers to build and render this page. While not the primary intent, the added value of "dogfooding" should not be under-estimated.
The prior PR #7771 had push-back since it introduced developer facing files. This PR solves all of the same problems, but does not have any new developer facing files (it actually removes one).
cc/ @wsouto, @dickeyxxx, @tyre, @ryanb, @josevalim, @maxim, @subdigital, @steveklabnik
ATP Railties and Actionpack.
|
|
|
|
| |
This reverts commit c59734f756b79c39486c45273d2cc5d42cd0c864.
|
|
|
|
|
|
|
|
|
|
| |
This commit inverts the precedence in ActionDispatch::Static so that
dynamic content will be served before static content. This is so that
precompiled assets do not inadvertently get included when running in
development mode - it should have no effect in production where static
files are usually handled by the web server.
Closes #6421
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 6acebb38bc0637bc05c19d87f8767f16ce79189b.
Usage of this feature did not reveal any improvement in existing apps.
Conflicts:
actionpack/lib/action_dispatch/routing/mapper.rb
guides/source/routing.textile
railties/lib/rails/engine.rb
railties/lib/rails/paths.rb
railties/test/paths_test.rb
|
|
|
|
| |
This includes new tests for /rails/info/routes
|
|
|
|
| |
Remove deprecation warning of method redefined.
|
| |
|
|
|
|
|
|
|
|
|
| |
This feature enables the ability to load an
external routes file from the router via:
draw :filename
External routes files go in +config/routes+. This
feature works in both engines and applications.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the current router DSL, using the +match+ DSL
method will match all verbs for the path to the
specified endpoint.
In the vast majority of cases, people are
currently using +match+ when they actually mean
+get+. This introduces security implications.
This commit disallows calling +match+ without
an HTTP verb constraint by default. To explicitly
match all verbs, this commit also adds a
:via => :all option to +match+.
Closes #5964
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
Allows specifying blocks to the routeset that will get appended after the RouteSet is drawn.
|
|
|
|
| |
Signed-off-by: Mikel Lindsaar <raasdnil@gmail.com>
|
| |
|
| |
|
|
|
|
| |
ensuring all configuration options were applied.
|
| |
|
|
|
|
|
|
| |
available standards support. This ensures that IE doesn't go into quirks mode because it has been blacklisted by too many users pressing the incompatible button. It also tells IE to use the ChromeFrame renderer, if the user has installed the plugin.
This guarantees that the best available standards support will be used on the client.
|
| |
|
| |
|
|
|
|
| |
initializers to application folder.
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
|
|
|
| |
passing so we added a test that actually tested this functionality.
|
|
|
|
| |
testing things that have their own load path semantics that should not be polluted), so rack/test is not yet on the load path. Moving require "rack/test" into the setup means and after boot_rails means that it'll be required after the laod path has been altered to add in the Rails vendor/gems
|
|\
| |
| |
| |
| |
| | |
Conflicts:
railties/test/initializer/initialize_i18n_test.rb
railties/test/initializer/path_test.rb
|
|/ |
|
| |
|
|
|
|
| |
Fixes dev mode reloading [#3574 state:resolved]
|
| |
|
|
|