| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \
| | |
| | | |
Use Rails to Render Default Index Page
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
attributes
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
database
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
fixtures
|
| | | | |
|
| |/ /
| | |
| | |
| | | |
generator
|
|\ \ \
| |/ /
|/| | |
Use `File.expand_path` instead of `File.join`
|
| | |
| | |
| | | |
cc/ @carlosantoniodasilva
|
| | |
| | |
| | |
| | | |
All our generated code follow this rule
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As of 2a68f68aead9fd65ecac8062ca8efc15f5bab418:
- Unit tests are now in test/models, instead of test/units
- Functional tests are now in test/controllers, instead of
test/functional
- Helper tests are now in test/helpers, instead of test/units/helpers
- Mailer tests are now in test/mailers, instead of test/functional
Update the rake task for code statistics (`rake stats`) so that it
recognizes files in the above locations as tests, and accurately
calculates statistics such as "Test LOC" and "Code to Test Ratio."
Safely handle Rails apps that still have tests in the old locations.
|
| |/
|/|
| |
| |
| | |
Otherwise it was matching "end" lines from blocks within the method body,
making tests such as the migration ones fail.
|
|\ \
| | |
| | | |
Fix #assert_instance_method to also assert indented methods
|
| | | |
|
|/ /
| |
| |
| |
| |
| | |
As [Security Guide](http://edgeguides.rubyonrails.org/security.html#whitelists-versus-blacklists)
says, it's better to use `before_filter only: []` instead of `except: []`
so we don't forget to turn the filter off for newly added actions.
|
|/
|
|
| |
callbacks
|
| |
|
| |
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
Sometimes, on Mac OS X, programmers accidentally press Option+Space
rather than just Space and don’t see the difference. The problem is
that Option+Space writes a non-breaking space (0XA0) rather than a
normal space (0x20).
This commit removes all the non-breaking spaces inadvertently
introduced in the comments of the code.
|
| |
|
|
|
|
|
| |
Turbolinks should be located at the bottom of application.js
to detect assets change properly.
|
| |
|
|\
| |
| | |
Add db to the list of default annotation folders
|
| | |
|
|/
|
|
|
| |
This will put ~/ in .gitconfig so it will not be hardcoded to the home
directory where the command was run.
|
| |
|
|
|
|
|
|
|
|
| |
They was extracted from a plugin.
See https://github.com/rails/rails-observers
[Rafael Mendonça França + Steve Klabnik]
|
|
|
|
|
|
|
|
|
| |
This reverts commit 33b29e0112db62d3a8c798bb58f51c0a839d9e26, reversing
changes made to ac8c729342e6b020a57d0d6887c8a8d5b39f96e0.
Reason:
https://github.com/rails/rails/pull/4684#commitcomment-920313
|
|
|
|
|
|
| |
* I guess this would be the preferrable default for Bundler
* current version of Bundler converts :rubygems into 'http://rubygems.org', not https://,
and that will help those who are working on a very poor network environment that doesn't allow SSL
|
| |
|
|
|
|
|
| |
Provides a better error message incase the database.yaml
has some errors.
|
|\
| |
| | |
require bundler groups to include rake-tasks in engines
|
| |
| |
| |
| |
| |
| |
| |
| | |
If you generate a full engine, this will include rake tasks from
your gem under the `app` namespace. For example if you have a dependency
on `rspec-rails` in your engine's `gemspec`. You will get the task `app:spec`
Closes #8229
|
| |
| |
| |
| |
| |
| | |
Remove not used variable.
Remove config attr_reader causing warning.
Fix indent in runner file.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using sqlite3 it was attempting to find the database file based on
Rails.root, the problem is that Rails.root is not always present because
we try to first manually load "config/database.yml" instead of loading
the entire app, to make "rails db" faster.
This means that when we're in the root path of the app, calling "rails db"
won't allow us to use Rails.root, making the command fail for sqlite3
with the error:
./rails/commands/dbconsole.rb:62:in `start':
undefined method `root' for Rails:Module (NoMethodError)
The fix is to simply not pass any dir string to File.expand_path, which
will make it use the current directory of the process as base, or the
root path of the app, which is what we want.
When we are in any other subdirectory, calling "rails db" should work
just fine, because "config/database.yml" won't be found, thus "rails db"
will fallback to loading the app, making Rails.root available.
Closes #8257.
|
|
|
|
| |
invocations of "rails new".
|
|\
| |
| |
| |
| | |
Conflicts:
actionpack/lib/action_dispatch/routing/redirection.rb
|
| | |
|
| |
| |
| |
| | |
config.assets.precompile
|
| |
| |
| |
| |
| |
| | |
This allows easy upgrading from the old signed Cookie Store <= 3.2
or the deprecated one in 4.0 (the ones that doesn't use key derivation)
to the new one that signs using key derivation
|
| |
| |
| |
| | |
Closes #8232 [ci skip]
|
|\ \
| | |
| | | |
Encrypted cookies
|
| | | |
|
| | | |
|
| | | |
|