aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* | Small enhancement for generatorsHolger Frohloff2015-02-031-2/+2
|/ | | | | 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.
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-2/+2
|
* Emit suggested generator names when not foundschneems2014-06-041-8/+52
| | | | | | | | | | | | | | | 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.
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2014-06-011-0/+5
|\
| * document generators hidden_namespacesschneems2014-05-291-0/+5
| |
* | print generators on failed generateschneems2014-05-261-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Revert "Merge pull request #15293 from ↵Yves Senn2014-05-241-16/+12
| | | | | | | | | | | | | | | | | | | | | | 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
* | print generators on failed generateschneems2014-05-241-12/+16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Require the top file and autoload Base classRafael Mendonça França2013-11-091-0/+1
| | | | | | | 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
* Remove "circular require considered harmful" errorRobin Dupret2013-11-011-2/+2
| | | | | rails/generators should not load rails/generators/base since the latter is loading it.
* s/plugin_new/pluginschneems2013-06-301-1/+1
| | | | | 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
* remove performance tests from the default stackYves Senn2013-01-101-2/+0
|
* Remove observers and sweepersRafael Mendonça França2012-11-281-2/+0
| | | | | | | | They was extracted from a plugin. See https://github.com/rails/rails-observers [Rafael Mendonça França + Steve Klabnik]
* Use Ruby 1.9 Hash syntax in railtiesRobin Dupret2012-10-141-29/+29
|
* Extract ActiveRecord::SessionStore from RailsPrem Sichanugrist2012-08-241-1/+0
| | | | | This functionality will be available from gem `active_record-session_store` instead.
* Removing ==Examples and last blank lines of docs from railtiesFrancesco Rodriguez2012-05-141-4/+0
|
* Add hook for add_resource_routeSantiago Pastorino2012-04-181-0/+2
|
* Remove --http.José Valim2012-03-141-22/+1
|
* Generate special controller and functional test templates for http appsCarlos Antonio da Silva2012-03-141-0/+2
| | | | | | | | | | | | 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]
* Allow generator configs from http_only! to be overriden by appCarlos Antonio da Silva2012-03-141-1/+1
| | | | [Carlos Antonio da Silva & Santiago Pastorino]
* Disable template, helper and assets options when using http_only!Carlos Antonio da Silva2012-03-141-1/+14
| | | | [Carlos Antonio da Silva & Santiago Pastorino]
* Create generators http_only! setup and hide some common namespaces for nowCarlos Antonio da Silva2012-03-141-1/+7
| | | | [Carlos Antonio da Silva & Santiago Pastorino]
* Rails::Plugin has goneSantiago Pastorino2012-01-031-11/+0
|
* Revert the serializers API as other alternatives are now also under discussionJosé Valim2011-11-251-3/+1
|
* Add a hook for serializers in the scaffold generator (off for now).José Valim2011-11-251-1/+3
|
* fix ambiguous * and remove unused variableAaron Patterson2011-08-241-2/+2
|
* Move Coffee generators and templates to Coffee Railtie and create ↵Santiago Pastorino2011-06-291-1/+1
| | | | javascript_engine ("js") for apps that remove Coffee gem
* Removed rescue branch for Rails 2.x compatibilityAlexey Gaziev2011-06-201-3/+0
|
* Fix regexp in generators for right catching error messageAlexey Gaziev2011-06-201-1/+1
|
* Use mattr_accessor :namespaceStefan Sprenger2011-06-071-10/+2
|
* Use namespace if it's a mountable engineStefan Sprenger2011-06-071-0/+10
|
* Streamline generators initialization flow.José Valim2011-05-251-11/+1
|
* Hide css:* and the default stylesheet from rails gwycats2011-05-241-1/+6
|
* Update generator config to support hiding namespaces and pass the app into ↵wycats2011-05-241-0/+1
| | | | generator blocks
* Move SCSS generators and default templates from Rails to the Sass Railtie ↵tomhuda2011-05-241-1/+1
| | | | | | | | (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
* default orm and test_framework to false; change application.rb template ↵Aditya Sanghi2011-05-061-2/+2
| | | | accordingly
* Fix assets generators.José Valim2011-04-171-0/+1
|
* Make generators more modular, add hooks and improve test suite.José Valim2011-04-171-2/+7
|
* The controller and resource generators will now automatically produce asset ↵David Heinemeier Hansson2011-04-141-0/+1
| | | | stubs (this can be turned off with --skip-assets). These stubs will use Coffee and Sass, if those libraries are available. [DHH]
* Allow generators nested in more than one levelSantiago Pastorino2011-01-121-1/+1
|
* Ensure that app generator is not loaded twice to get rid of warningsPiotr Sarnacki2010-11-221-0/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Tidy up generators commits.José Valim2010-11-171-0/+1
|
* Perf: speed up 2 methods in railties.Emilio Tagua2010-09-221-4/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Trifling typosRaphomet2010-08-211-2/+2
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Remove the --singeleton option from scaffold generator.Prem Sichanugrist2010-06-241-2/+1
| | | | | | | | 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>
* Tidy up generators based on latest change on AM.José Valim2010-06-131-1/+1
|
* Hide remaining generators hooks [#4790 state:resolved]José Valim2010-06-081-1/+5
|
* Still copy application configuration to generator even if they are required ↵José Valim2010-06-031-6/+2
| | | | earlier. Also tidy up the guide a little bit.
* Update hidden namespace mechanism to work better with alternate choices and ↵wycats2010-05-051-4/+42
| | | | to support full namespaces (not just entire groups)
* Partially revert "A new application now comes with a layout and a stylesheet."Jeremy Kemper2010-04-091-0/+2
| | | | | | | | | 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