| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Changes a call to #map and a subsequent call to #flatten to the more idiomatic
version of #flat_map. This commit also removes an unnessecary return statement.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
schneems/schneems/generator-output-in-error"
This reverts commit 7466d6a9f989a1a8f90899b79b34f1152e440b7c, reversing
changes made to b850c4c540e8f0c15742f67c532f521a4a123655.
This was an accidental merge. A new PR will follow.
/cc @schneems
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
The generators entry point file is rails/generators so we need to make
sure uers will be able to use the generators when requiring that file.
Fixes #12802
|
|
|
|
|
| |
rails/generators should not load rails/generators/base since the
latter is loading it.
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
They was extracted from a plugin.
See https://github.com/rails/rails-observers
[Rafael Mendonça França + Steve Klabnik]
|
| |
|
|
|
|
|
| |
This functionality will be available from gem
`active_record-session_store` instead.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
| |
[Carlos Antonio da Silva & Santiago Pastorino]
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
javascript_engine ("js") for apps that remove Coffee gem
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
generator blocks
|
|
|
|
|
|
|
|
| |
(d435726312601edb3ba6f97b34f562221f72c1f8).
* Sass gem registers a compressor
* Sass gem registers generators for assets and scaffold
* Create a default stylesheet_engine ("css") for apps that remove the Sass gem
|
|
|
|
| |
accordingly
|
| |
|
| |
|
|
|
|
| |
stubs (this can be turned off with --skip-assets). These stubs will use Coffee and Sass, if those libraries are available. [DHH]
|
| |
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
|
|
|
|
| |
It turned out to be that scaffold for singeleton resource will always depend on another model, and it's not possible at the moment to make the application tests pass after generate the singeleton scafold. So, it would be better to remove it for now and probably provide another generator, such as singeleton_scaffold, in which also require the depended model name.
[#4863 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
| |
|
|
|
|
| |
earlier. Also tidy up the guide a little bit.
|
|
|
|
| |
to support full namespaces (not just entire groups)
|
|
|
|
|
|
|
|
|
| |
This reverts commit ea2c5fa8046e2f953b366adc94f0610ccfea0828.
Conflicts:
railties/lib/rails/generators/rails/app/templates/app/views/layouts/application.html.erb
railties/test/generators/app_generator_test.rb
|