aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* | Make ActiveSupport::Inflector locale aware and multilingualDavid Celis2012-07-301-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Inflector is currently not very supportive of internationalized websites. If a user wants to singularize and/or pluralize words based on any locale other than English, they must define each case in locale files. Rather than create large locale files with mappings between singular and plural words, why not allow the Inflector to accept a locale? This patch makes ActiveSupport::Inflector locale aware and uses `:en`` unless otherwise specified. Users will still be provided a list of English (:en) inflections, but they may additionally define inflection rules for other locales. Each list is kept separately and permanently. There is no reason to limit users to one list of inflections: ActiveSupport::Inflector.inflections(:es) do |inflect| inflect.plural(/$/, 's') inflect.plural(/([^aeéiou])$/i, '\1es') inflect.plural(/([aeiou]s)$/i, '\1') inflect.plural(/z$/i, 'ces') inflect.plural(/á([sn])$/i, 'a\1es') inflect.plural(/é([sn])$/i, 'e\1es') inflect.plural(/í([sn])$/i, 'i\1es') inflect.plural(/ó([sn])$/i, 'o\1es') inflect.plural(/ú([sn])$/i, 'u\1es') inflect.singular(/s$/, '') inflect.singular(/es$/, '') inflect.irregular('el', 'los') end 'ley'.pluralize(:es) # => "leyes" 'ley'.pluralize(:en) # => "leys" 'avión'.pluralize(:es) # => "aviones" 'avión'.pluralize(:en) # => "avións" A multilingual Inflector should be of use to anybody that is tasked with internationalizing their Rails application. Signed-off-by: David Celis <david@davidcelis.com>
* | Merge pull request #6991 from frodsan/performance_test_generatorRafael Mendonça França2012-07-242-2/+2
|\ \ | | | | | | update performance test template to use test method
| * | update performance test template to use test methodFrancesco Rodriguez2012-07-062-2/+2
| | |
* | | Add fkey attributes to `join_table` migration generatorAleksey Magusev2012-07-191-1/+9
| | |
* | | Remove `:confirm` in favor of `:data => { :confirm => 'Text' }` optionCarlos Galdino2012-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This applies to the following helpers: `button_to` `button_tag` `image_submit_tag` `link_to` `submit_tag`
* | | Merge pull request #7028 from lexmag/join_table_indexesJosé Valim2012-07-181-1/+2
|\ \ \ | | | | | | | | Add indexes to create_join_table method
| * | | Add join table migration generatorAleksey Magusev2012-07-181-1/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* / / A more informative comment for config.asset.debugJared Beck2012-07-161-1/+1
|/ /
* | Merge pull request #6959 from robin850/patch-1José Valim2012-07-051-0/+49
|\ \ | | | | | | Add few information on the field types
| * | Add few information on the field typesRobin Dupret2012-07-041-0/+49
| | |
* | | CSV fixtures aren't supported by default anymore, update generated ↵Guillermo Iguaran2012-07-041-1/+1
|/ / | | | | | | test_helper.rb to reflect that
* | remove test/dummy from gitignore when "plugin new -T"Francesco Rodriguez2012-07-031-0/+2
| |
* | Merge pull request #6856 from lexmag/polymorphic_generatorsCarlos Antonio da Silva2012-06-271-2/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Add polymorphic option to model generator For instance, $ rails g model Product supplier:references{polymorphic} generate model with `belongs_to :supplier, polymorphic: true` association and appropriate migration.
| * | Add polymorphic option to model generatorAleksey Magusev2012-06-271-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge pull request #6839 from bcardarella/async-actionmailerAaron Patterson2012-06-261-0/+3
|\ \ \ | |/ / |/| | Async actionmailer
| * | Add commented out ActionMailer async config optionBrian Cardarella2012-06-231-0/+3
| | |
* | | ruby 1.9 hash syntax for generated codeRichard Huang2012-06-235-12/+12
|/ / | | | | | | | | | | | | | | app/controllers/application_controller.rb app/views/layouts/application.html.erb config/application.rb config/routes.rb test/performance/browsing_test.rb
* | use system tmpdir rather than our ownAaron Patterson2012-06-191-2/+10
| |
* | Change minimum (default) log level in PostgreSQL to warning.kennyj2012-06-182-4/+4
| |
* | Require thor 0.15.3 onwardsJosé Valim2012-06-181-0/+1
| |
* | Merge pull request #6692 from schneems/schneems/something-went-wrongJosé Valim2012-06-102-0/+2
|\ \ | | | | | | Add Prompt to 404 & 500 Pages to Check Logs in Production
| * | add prompt to 404 & 500 pages to check logsschneems2012-06-092-0/+2
| | | | | | | | | When new programmers push their code to a production server and receive an error they often don't know to check the logs, this simple reminder will help. Most professional applications have custom error pages so this change shouldn't affect them. The wording of the message should not confuse non-developer visitors.
* | | Merge pull request #6665 from schneems/schneems/raise-migration-errorJosé Valim2012-06-102-0/+5
|\ \ \ | |/ / |/| | Notify A User they Have Pending Migrations
| * | raise error for pending migration schneems2012-06-092-0/+5
| | | | | | | | | can be configured by setting config.active_record.migration. Setting to :page_load will raise an error on each page refresh if there are migrations that are pending. Setting to :page_load is defaulted in development for new applications.
* | | Merge pull request #6681 from arunagw/plugin_gen_fixRafael Mendonça França2012-06-081-1/+1
|\ \ \ | | | | | | | | Plugin gen fix
| * | | We should not include engine.rake file into rakeArun Agrawal2012-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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