aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators
Commit message (Collapse)AuthorAgeFilesLines
* Everyone is running bundler, no need for defensive programming shitDavid Heinemeier Hansson2012-10-081-2/+2
|
* Not precompiling your assets for production is a bad idea -- do not encourage itDavid Heinemeier Hansson2012-10-081-6/+2
|
* Revert "Use flat_map { } instead of map {}.flatten"Santiago Pastorino2012-10-051-1/+1
| | | | | | | | | | | This reverts commit abf8de85519141496a6773310964ec03f6106f3f. We should take a deeper look to those cases flat_map doesn't do deep flattening. irb(main):002:0> [[[1,3], [1,2]]].map{|i| i}.flatten => [1, 3, 1, 2] irb(main):003:0> [[[1,3], [1,2]]].flat_map{|i| i} => [[1, 3], [1, 2]]
* Use flat_map { } instead of map {}.flattenSantiago Pastorino2012-10-051-1/+1
|
* Comment rack-cache entry on GemfileGuillermo Iguaran2012-10-041-1/+1
|
* config.action_dispatch.rack_cache should set explicitly to enable Rack::CacheGuillermo Iguaran2012-10-041-0/+5
|
* Strip heredoc to not generate the Gemfile with trailing spacesRafael Mendonça França2012-10-041-2/+2
|
* Turn turbolinks on by default for new appsDavid Heinemeier Hansson2012-10-043-4/+11
|
* Merge pull request #7794 from guilleiguaran/extract-rack-cacheSantiago Pastorino2012-10-011-0/+4
|\ | | | | Use Rack::Cache middleware only if is in Gemfile
| * Add rack-cache to default GemfileGuillermo Iguaran2012-10-011-0/+4
| |
* | Fixed generated whitespace in routes when using namespaced resource.Jeremy Walker2012-09-291-4/+41
|/
* Remove of an extra line in template configuration file.Geoffrey Roguelon2012-09-241-1/+0
|
* Removed sorting of attribute names in controller generator.Brian Morearty2012-09-231-1/+1
| | | | | | | | | | | | | | | | | | I believe when people use generators, they typically order the parameters on the command line in an order that makes sense to them. Sorting them in the generated code makes the order seem more arbitrary to humans, even though it's less arbitrary to computers. :-) Example: rails g scaffold Post title:string content:text The human chose to put title before content. Sorted attributes in the generated code work but don't match the human's intent: params.require(:posts).permit(:content, :title)
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-09-211-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/configurable.rb activesupport/lib/active_support/core_ext/module/deprecation.rb guides/source/action_controller_overview.md guides/source/active_support_core_extensions.md guides/source/ajax_on_rails.textile guides/source/association_basics.textile guides/source/upgrading_ruby_on_rails.md While resolving conflicts, I have chosen to ignore changes done in docrails at some places - these will be most likely 1.9 hash syntax changes.
| * Remove redundant 'the'.Uģis Ozols2012-09-131-1/+1
| |
* | Change scaffold_generator: Don't use #require or #permit in scaffold if ↵Guillermo Iguaran2012-09-161-0/+4
| | | | | | | | attributes list isn't given
* | Change scaffold_controller to generate and use private method to encapsulate ↵Guillermo Iguaran2012-09-162-2/+12
| | | | | | | | permissible params
* | Remove all references to attr_accessible/protected and old ↵Guillermo Iguaran2012-09-163-13/+0
| | | | | | | | mass_assignment_sanitizers
* | Move queue classes to ActiveSupportSantiago Pastorino2012-09-142-2/+2
| |
* | Merge pull request #7616 from lest/null-session-forgery-protectionMichael Koziarski2012-09-131-1/+1
|\ \ | | | | | | Implement :null_session CSRF protection method
| * | Implement :null_session CSRF protection methodSergey Nartimov2012-09-131-1/+1
| |/ | | | | | | | | | | | | | | It's further work on CSRF after 245941101b1ea00a9b1af613c20b0ee994a43946. The :null_session CSRF protection method provide an empty session during request processing but doesn't reset it completely (as :reset_session does).
* | change app/plugin generators to be more SCM agnosticDerek Prior2012-09-123-61/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove the queue configuration from the environments templates since theRafael Mendonça França2012-09-122-4/+1
| | | | | | | | default is the SynchronousQueue.
* | Use the SynchronousQueue as default in production and development.Rafael Mendonça França2012-09-122-4/+4
| | | | | | | | | | We should not let the users use the ThreadedConsumer without know about the risks
* | Action Mailer async flag is true by default using a Synchronous implSantiago Pastorino2012-09-111-3/+0
|/
* require bundle in the app generatorXavier Noria2012-09-011-0/+1
| | | | | | | The app generator is not generally run under bundler, but the Bundler constant is used here. In particular you cannot create --dev apps without this.
* Use Bundler.with_clean_env instead of custom codePiotr Sarnacki2012-08-311-6/+3
|
* Revert "Revert changes related to `bundle install` fixes in `rails new`"Piotr Sarnacki2012-08-311-1/+10
| | | | | | | | 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.
* Change generators controller help from singular to plural example.Philipp Weissensteiner2012-08-281-6/+6
| | | | | | | When running `rails generate controller --help` an example with creating a (singular) "CreditCard" controller is shown. The convention is to generate controllers with plural names though.
* Remove meta Sesion Migration generatorPrem Sichanugrist2012-08-242-16/+0
|
* Extract ActiveRecord::SessionStore from RailsPrem Sichanugrist2012-08-241-5/+0
| | | | | This functionality will be available from gem `active_record-session_store` instead.
* edit secret token template comment [ci skip]Vijay Dev2012-08-231-1/+1
|
* remind user a good way to generate a secret code.Teng Siong Ong2012-08-211-0/+3
|
* Merge pull request #7225 from rails/eager_loadJosé Valim2012-08-213-0/+14
|\ | | | | Improve eager load on Rails
| * Allow users to choose when to eager_load the application or not.José Valim2012-08-213-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the eager load behavior was mostly coupled to config.cache_classes, however this was suboptimal since in some environments a developer may want to cache classes but not necessarily load them all on boot (for example, test env). This pull request also promotes the use of config.eager_load set to true by default in production. In the majority of the cases, this is the behavior you want since it will copy most of your app into memory on boot (which was also the previous behavior). Finally, this fix a long standing Rails bug where it was impossible to access a model in a rake task when Rails was set as thread safe.
* | Merge pull request #6499 from lazylester/patch-1Carlos Antonio da Silva2012-08-211-1/+1
|\ \ | |/ |/| | | Clarify and correct the description for the --full option of the plugin_new generator. [ci skip]
| * Clarify and correct the description for the --full option of the plugin_new ↵lazylester2012-08-211-1/+1
| | | | | | | | generator
* | fix punctuation in config templatesFrancesco Rodriguez2012-08-207-12/+12
| |
* | Update to activerecord-deprecated_finders on generatorMiguel Herranz2012-08-171-2/+2
| |
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-08-161-2/+20
|\ \
| * | copy edits [ci skip]Vijay Dev2012-08-161-7/+6
| | |
| * | Add extra documentation to the locale file.Steve Klabnik2012-08-041-2/+21
| | |
* | | Move AD default_headers configurations to railtieGuillermo Iguaran2012-08-101-5/+0
| | | | | | | | | | | | | | | | | | ActionDispatch railtie is a better place for config.action_dispatch.default_headers settings, users can continue overriding those settings in their configuration files if needed.
* | | Remove the dependent_restrict_raises option.Jon Leighton2012-08-101-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | introduce default_headers configEgor Homakov2012-08-091-0/+5
| | |
* | | Remove highly uncommon option for moving the manifest pathDavid Heinemeier Hansson2012-08-081-3/+0
| | |
* | | Observers are no longer important enough to get this configuration option ↵David Heinemeier Hansson2012-08-071-3/+0
| | | | | | | | | | | | called out at the top level
* | | Revert "The application generator generates `public/humans.txt` with some ↵David Heinemeier Hansson2012-08-071-7/+0
| | | | | | | | | | | | 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
* | | removes usage of Object#in? from the code base (the method remains defined ↵Xavier Noria2012-08-061-2/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by Active Support) Selecting which key extensions to include in active_support/rails made apparent the systematic usage of Object#in? in the code base. After some discussion in https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d we decided to remove it and use plain Ruby, which seems enough for this particular idiom. In this commit the refactor has been made case by case. Sometimes include? is the natural alternative, others a simple || is the way you actually spell the condition in your head, others a case statement seems more appropriate. I have chosen the one I liked the most in each case.
* | Updated scaffold_controller generator docs #7146Aaron Cruz2012-07-311-4/+3
| | | | | | | | | | | | | | | | | | | | It was just a copy of the controller generator documentation which was misleading. It doesn't accept arguments for views. This seems more descriptive as well. Respect 80 char limit. #7147 Made a nicer paragraph #7147