| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Related to a06a84bf77082a7435973fa1b6c8254fb410f243
|
| |
|
|\
| |
| |
| |
| | |
malclocke/add_option_to_skip_index.html_on_rails_generate
Added a generator option to skip the public/index.html file
|
| |
| |
| |
| |
| |
| |
| | |
generating a new Rails application
The option is:
-i, [--skip-index-html] # Skip public/index.html file
|
| | |
|
|\ \
| | |
| | | |
Don't indent blank lines in named base generators
|
| | | |
|
|/ / |
|
| | |
|
| |
| |
| |
| | |
Broken after this 6a054b0038bac288a1f6e45feb5470f4ee492081
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
In case `source_roout` is not set, `default_source_root` is used,
which includes also `templates` directory. If there is no `templates`
directory, `default_source_root` is not available and USAGE will not
be displayed. USAGE should be also checked based on default
directory excluding `templates`.
|
| |
| |
| |
| | |
@spastorino request
|
|\ \
| | |
| | | |
Remove blank line from generated migration
|
| |/ |
|
|/
|
|
|
| |
When generating a migration that removes a field with an index, the down
will add both the field and its index.
|
| |
|
| |
|
|
|
|
| |
[Carlos Antonio da Silva & Santiago Pastorino]
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main goal is to not generate the format.html block in scaffold
controller, and to generate a different functional test as we don't rely
on redirects anymore, we should test for http responses.
In addition to that, the :edit action is removed from the http
controller and the edit route is not generated by default, as they
usually do not make sense in this scenario.
[Carlos Antonio da Silva & Santiago Pastorino]
|
|
|
|
| |
[Carlos Antonio da Silva & Santiago Pastorino]
|