| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
include :en
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When generating models, we created ApplicationRecord in the default
location if no file existed there. That was annoying for people who
moved it to somewhere else in the autoload path. At this point, the
vast majority of apps should have either run the upgrade script or
generated a model since upgrading. For those that haven't the error
message after generating a new model should be helpful:
NameError: uninitialized constant ApplicationRecord
To ease friction in that case, this also adds a generator for
ApplicationRecord.
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
| |
|
|
|
|
|
|
| |
".. with __dir__ we can restore order in the Universe." - by @fxn
Related to 5b8738c2df003a96f0e490c43559747618d10f5f
|
|
|
|
|
|
|
|
| |
This fixes the following thor's warning.
```
Expected string default value for '--generate'; got false (boolean)
```
|
|
|
|
|
|
| |
assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message
assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong
|
|
|
|
|
|
|
|
| |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
| |
|
| |
|
|
|
|
| |
In my machine the output is different
|
|
|
|
| |
This reverts commit 6a7cf515123889360d272e8ab4be045578dfc0fb.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We are planning to remove mocha from our test suite because of
performance problems. To make this possible we should stop require mocha
on ActionSupport::TestCase.
This should not affect applications since users still need to add mocha
to Gemfile and this already load mocha.
Added FIXME notes to place that still need mocha removal
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When someone types in a generator command it currently outputs all generators. Instead we can attempt to find a subtle mis-spelling by running all generator names through a levenshtein_distance algorithm provided by rubygems.
So now a failure looks like this:
```ruby
$ rails generate migratioooons
Could not find generator 'migratioooons'. Maybe you meant 'migration' or 'integration_test' or 'generator'
Run `rails generate --help` for more options.
```
If the suggestions are bad we leave the user with the hint to run `rails generate --help` to see all commands.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let's say we just ran:
```
$ rails g migrate add_click_to_issue_assignment
```
We will get an error that looks like:
```
Could not find generator migrate.
```
This patch adds all existing migrations to the output to make it easier for a developer to find a valid migration.
```
Could not find generator "migrate". Please select a valid generator:
Rails:
assets
controller
generator
helper
integration_test
mailer
migration
model
resource
scaffold
scaffold_controller
task
```
It would be nice to do some spelling detection and suggest alternatives, but for now this should help.
|
|
|
|
| |
Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
|
|
|
|
|
| |
This fixes railties tests in JRuby but break it in MRI
This reverts commit fea99276c7024f183bf72a16ad9f36af4bae1d42.
|
|
|
|
| |
With this change jruby should pass all of the railties tests.
|
|
|
|
|
| |
There are historical reasons that the `plugin` command was `plugin_new`, now those are no longer applicable, we should remove the naming edge case from the project. This PR is based off of comments from #11176
ATP Railties
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Mocha is already required by AS::TestCase, so remove the duplicate
requires.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
| |
[Carlos Antonio da Silva & Santiago Pastorino]
|
|
|
|
|
|
| |
It is usually useful to be able to hide a generator when running rails
generate command. Such generators might be used only to dry up
generators code and shouldn't be available to end users.
|
| |
|
| |
|
|
|
|
| |
test_load_generators_from_railties
|
|
|
|
|
|
| |
this fixes: "warning: ambiguous first argument; put parentheses or even spaces"
because: you need this to tell the parser that you're not calling :/ method (division)
details (Japanese!): http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-dev/42445?42370-43277
|
| |
|
|
|
|
| |
This will make `rails g rspec:install --help` shows "rails generate rspec:install [options]" and not "rails generate install [options]"
|
| |
|
|
|
|
|
|
|
|
| |
--skip-test-unit and --skip-active-record respectively
Reason is their proper spellings are "Test::Unit" and "Active Record".
Option names and descriptions have been revised, as well as some method
names and minor details here and there.
|
| |
|
|
|
|
| |
former since it's less obstrusive.
|
|
|
|
| |
status:resolved]
|
| |
|