| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
as it's removed here
1fc795468525d8622cdca474a54c8310a514aa46
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the default test locations to avoid confusion around the common
testing terms "unit" and "functional".
Add new rake tasks for the new locations, while maintaining backwards
compatibility with the old rake tasks.
New testing locations are as follows:
app/models -> test/models (was test/units)
app/helpers -> test/helpers (was test/units/helpers)
app/controllers -> test/controllers (was test/functional)
app/mailers -> test/mailers (was test/functional)
|
|\
| |
| | |
Use Rack::Cache middleware only if is in Gemfile
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
| |
permissible params
|
|
|
|
| |
mass_assignment_sanitizers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Users of other SCM's can now generate rails
apps that will add the "empty" directories to source control,
but will not have a useless .gitignore or mis-named .gitkeep
files.
* Change `rails new` and `rails plugin new` generators to name
the `.gitkeep` as `.keep` in a more SCM-agnostic way.
* Change `--skip-git` option to only skip the `.gitignore` file
and still generate the `.keep` files.
* Add `--skip-keeps` option to skip the `.keep` files.
It closes #2800.
|
|
|
|
| |
move validation to AR
|
|
|
|
|
|
|
|
| |
The cause of the previous revert was bug in bundler that made it hard to
make railties test work. Fix for bundler was recently pushed to github,
so now we can safely get back to the original commit.
This reverts commit 0f5cc34ab58cda99d1401ecc82e1ebb873838dd7.
|
|
|
|
|
| |
This functionality will be available from gem
`active_record-session_store` instead.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's not really a good idea to have this as a global config option. We
should allow people to specify the behaviour per association.
There will now be two new values:
* :dependent => :restrict_with_exception implements the current
behaviour of :restrict. :restrict itself is deprecated in favour of
:restrict_with_exception.
* :dependent => :restrict_with_error implements the new behaviour - it
adds an error to the owner if there are dependent records present
See #4727 for the original discussion of this.
|
|
|
|
| |
basic data". I dont consider this something most people is going to want most of the time. If you want to add it in your own app, knock yourself out. But it doesnt belong in Rails imo
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For instance, running
rails g migration CreateMediaJoinTable artists musics:uniq
will create a migration with
create_join_table :artists, :musics do |t|
# t.index [:artist_id, :music_id]
t.index [:music_id, :artist_id], unique: true
end
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AddXXXToYYY/RemoveXXXFromYYY migrations are produced with references
statements, for instance
rails g migration AddReferencesToProducts user:references
supplier:references{polymorphic}
will generate the migration with:
add_reference :products, :user, index: true
add_reference :products, :supplier, polymorphic: true, index: true
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
For instance,
$ rails g model Product supplier:references{polymorphic}
generate model with `belongs_to :supplier, polymorphic: true` association and appropriate migration.
Also fix model_generator_test.rb#L196 and #L201
|
|\
| |
| | |
Plugin gen fix
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
if we are passing -T which is skip_test_unit
See issue #6673 for more details.
I saw that we are not creating dummy app even if
we do skip_test_unit.
Fixes #6673
|
| | |
|
|/
|
|
| |
(closes #6672)
|
|
|
|
| |
app generator
|
| |
|
|
|
|
| |
f4d7af67ffc90f2542afa50c7579fc83ea4f45f2
|
| |
|
|
|
|
|
|
| |
The Gemfile of new application uses ruby 1.9 hashes. Gem method of
generators should use them too. It prevents from mixing two kinds of
syntax in one file.
|
|
|
|
|
|
|
| |
Using require in development mode will prevent required files from
reloading, even if they're changed. In order to keep namespaced
application_controller reloadable, we need to use require_dependency
instead of require.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In development mode, dependencies are loaded dynamically at runtime,
using `const_missing`. Because of that, when one of the constants is
already loaded and `const_missing` is not triggered, user can end up
with unexpected results.
Given such file in an Engine:
```ruby
module Blog
class PostsController < ApplicationController
end
end
```
If you load it first, before loading any application files, it will
correctly load `Blog::ApplicationController`, because second line will
hit `const_missing`. However if you load `ApplicationController` first,
the constant will be loaded already, `const_missing` hook will not be
fired and in result `PostsController` will inherit from
`ApplicationController` instead of `Blog::ApplicationController`.
Since it can't be fixed in `AS::Dependencies`, the easiest fix is to
just explicitly load application controller.
closes #6413
|
| |
|
|
|
|
|
| |
Minitest uses different signature for assert_no_match, so we have to
swap arguments.
|
|
|
|
|
|
|
|
|
|
|
| |
Reverted changes:
f3482a9 Fix tests in railties
5904295 improve #6318
aed906a prevent using already loaded Gemfile for 'bundle install'
In order to fix this, we need a fix in bundler related to GEM_PATH,
which will allow to run tests properly. I will get this changes back
when it happens.
|
|
|
|
|
|
|
|
| |
Since `bundle install` was fixed in `rails plugin new`, it
now requires `rails 4.0.0.beta` version in filesystem when
running tests. Instead of providing it, we can run tested
command with `--dev` option, to use rails from the local
directory.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|