All our generated code follow this rule
As of 2a68f68: - 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.
…tation Otherwise it was matching "end" lines from blocks within the method body, making tests such as the migration ones fail.
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.
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.
* 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
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.
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
invocations of "rails new".
Closes #8232 [ci skip]