aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #13612 from eval/issue-13588Rafael Mendonça França2014-01-304-16/+230
|\ | | | | Add CreateMigration action
| * Add CreateMigration actionGert Goet2014-01-284-16/+230
| | | | | | | | | | | | | | | | | | | | This Thor-action isolates the logic whether to (over-)write migration and what is shown to the user. It's modelled after Thor's CreateFile-action. This solves the issue that removing a non-existing migration, tried to remove the template-path (#13588). Related issues: #12674
* | fix typo and indent. [ci skip]Yves Senn2014-01-302-2/+2
| |
* | Merge pull request #13774 from prathamesh-sonpatki/post-to-articleYves Senn2014-01-3020-407/+429
|\ \ | | | | | | Replace Post model with Article model in getting started guide [ci skip]
| * | Replace Post with Article in getting started guide [ci skip]Prathamesh Sonpatki2014-01-2520-407/+429
| | | | | | | | | | | | | | | | | | | | | | | | - Used Article model instead of Post as it may confuse with 'post' requests - Tried to wrap the guide to 80 chars lines as much as possible. - Removed unused image - Fixes #13764
* | | Merge pull request #13884 from rafaelfranca/rm-travel-backRafael Mendonça França2014-01-306-14/+58
|\ \ \ | | | | | | | | Add `travel_back` to remove stubs from `travel` and `travel_to` and remove auto-rollback after each test case
| * | | Improve documentation [ci skip]Rafael Mendonça França2014-01-302-5/+7
| | | |
| * | | Remove automatic removal of Date/Time stubs after each test caseRafael Mendonça França2014-01-305-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | This behavior is only work out-of-box with minitest and also add a downside to run after each test case, even if we don't used the travel or travel_to methods
| * | | Add `travel_back` to remove stubs from `travel` and `travel_to`Rafael Mendonça França2014-01-304-3/+33
|/ / /
* | | Merge pull request #13878 from marcandre/leave_my_options_aloneRafael Mendonça França2014-01-302-2/+8
|\ \ \ | | | | | | | | find_in_batches should not mutate its argument
| * | | find_in_batches should not mutate its argumentMarc-Andre Lafortune2014-01-292-2/+8
| | | |
* | | | tidy CHANGELOGs [ci skip]Yves Senn2014-01-305-18/+25
| | | |
* | | | docs, `references` is only used with `includes`. Closes #13727.Yves Senn2014-01-301-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no gain in `referencing` tables that are not used for preloading. Furthermore it will break if polymorphic associations are invloved. This is because `references_eager_loaded_tables?` uses all `reference_values` to decide wether to `eager_load` or `preload`.
* | | | Merge pull request #13888 from rails/session-serializerGodfrey Chan2014-01-306-32/+23
|\ \ \ \ | | | | | | | | | | Modify the session serializer implementation
| * | | | Modify the session serializer implementationGuillermo Iguaran2014-01-306-32/+23
|/ / / / | | | | | | | | | | | | | | | | Rename allowed options to :marshal and :json, for custom serializers only allow the use of custom classes.
* | | | Merge pull request #13883 from rafaelfranca/rm-time-travelRafael Mendonça França2014-01-291-4/+53
|\ \ \ \ | | | | | | | | | | Alternative implementation to make time travel not dependent on mocha
| * | | | Use each_valueRafael Mendonça França2014-01-291-1/+1
| | | | |
| * | | | Store the singleton_class in a local variableRafael Mendonça França2014-01-291-3/+4
| | | | |
| * | | | Change the class and method visibilityRafael Mendonça França2014-01-291-9/+13
| | | | |
| * | | | Use instance method instead of before hookRafael Mendonça França2014-01-291-9/+8
| | | | |
| * | | | Alias the original method first to avoid warningsRafael Mendonça França2014-01-291-2/+7
| | | | |
| * | | | Implement a simple stub feature to use in the Time travel helpersRafael Mendonça França2014-01-291-4/+44
|/ / / /
* | | | Merge pull request #13879 from ↵Rafael Mendonça França2014-01-291-0/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | schneems/schneems/more-explicit-database-config-error Enhance errors while retrieving database config
| * | | | Enhance errors while retrieving database configschneems2014-01-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now if there is an error retrieving database configuration the intent of the error (what the code was trying to do while you got the error) could be more explicit. Instead of this error: ``` Invalid DATABASE_URL: nil (erb):9:in `rescue in <main>' (erb):6:in `<main>' /Users/schneems/.rbenv/versions/2.1.0/lib/ruby/2.1.0/erb.rb:850:in `eval' /Users/schneems/.rbenv/versions/2.1.0/lib/ruby/2.1.0/erb.rb:850:in `result' /Users/schneems/Documents/projects/rails/railties/lib/rails/application/configuration.rb:98:in `database_configuration' /Users/schneems/Documents/projects/rails/activerecord/lib/active_record/railtie.rb:41:in `block in <class:Railtie>' /Users/schneems/Documents/projects/rails/railties/lib/rails/railtie.rb:237:in `instance_exec' /Users/schneems/Documents/projects/rails/railties/lib/rails/railtie.rb:237:in `block in run_tasks_blocks' /Users/schneems/Documents/projects/rails/railties/lib/rails/railtie.rb:237:in `each' /Users/schneems/Documents/projects/rails/railties/lib/rails/railtie.rb:237:in `run_tasks_blocks' /Users/schneems/Documents/projects/rails/railties/lib/rails/application.rb:339:in `block in run_tasks_blocks' /Users/schneems/Documents/projects/rails/railties/lib/rails/engine/railties.rb:13:in `each' ``` I propose we issue this error: ``` Cannot load `Rails.application.database_configuration`: Invalid DATABASE_URL: nil (erb):9:in `rescue in <main>' (erb):6:in `<main>' /Users/schneems/.rbenv/versions/2.1.0/lib/ruby/2.1.0/erb.rb:850:in `eval' /Users/schneems/.rbenv/versions/2.1.0/lib/ruby/2.1.0/erb.rb:850:in `result' /Users/schneems/Documents/projects/rails/railties/lib/rails/application/configuration.rb:98:in `database_configuration' /Users/schneems/Documents/projects/rails/activerecord/lib/active_record/railtie.rb:41:in `block in <class:Railtie>' /Users/schneems/Documents/projects/rails/railties/lib/rails/railtie.rb:237:in `instance_exec' /Users/schneems/Documents/projects/rails/railties/lib/rails/railtie.rb:237:in `block in run_tasks_blocks' /Users/schneems/Documents/projects/rails/railties/lib/rails/railtie.rb:237:in `each' /Users/schneems/Documents/projects/rails/railties/lib/rails/railtie.rb:237:in `run_tasks_blocks' /Users/schneems/Documents/projects/rails/railties/lib/rails/application.rb:339:in `block in run_tasks_blocks' /Users/schneems/Documents/projects/rails/railties/lib/rails/engine/railties.rb:13:in `each' ```
* | | | | AestheticRafael Mendonça França2014-01-293-13/+13
| | | | |
* | | | | Merge pull request #13867 from mauricio/bug-13861Rafael Mendonça França2014-01-295-1/+52
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Fixing issue with activerecord serialization not being able to dump a record after loading it from YAML - fixes #13861
| * | | | | Fixing issue with activerecord serialization not being able to dump a record ↵Mauricio Linhares2014-01-295-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | after loading it from YAML - fixes #13861
* | | | | | Merge pull request #13876 from sowjumn/masterRafael Mendonça França2014-01-291-10/+5
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Added some style changes in asset pipeline documentation
| * | | | | Added some style changes in asset pipeline documentationsowjanya2014-01-291-10/+5
| | | | | |
* | | | | | Merge pull request #13871 from kassio/fix-filters-with-classes-documentationRobin Dupret2014-01-293-2/+12
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Fix documentation of filters api with classes [ci skip]
| * | | | | Fix documentation of new controller filters api [ci skip]Kassio Borges2014-01-293-2/+12
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The api for filters with classes change and the guides weren't updated. Now the class must respond for methods with the same name as the filter, so the `before_action` calls a `before` method, and so on. The method `#filter` has been deprecated in 4.0.0 and has been removed in 4.1.0: #7560
* | | | | Merge pull request #13201 from marcandre/find_in_batch_enumeratorRafael Mendonça França2014-01-293-0/+27
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | `find_in_batches` now returns an `Enumerator` Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/batches.rb
| * | | | `find_in_batches` now returns an `Enumerator` when called without a block, ↵Marc-Andre Lafortune2013-12-063-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | so that it can be chained with other `Enumerable` methods.
* | | | | Merge pull request #13877 from marcandre/find_in_batchesRafael Mendonça França2014-01-291-0/+2
|\ \ \ \ \ | | | | | | | | | | | | Mention find_each in find_in_batches doc [ci skip]
| * | | | | Mention find_each in find_in_batches doc [ci skip]Marc-Andre Lafortune2014-01-291-0/+2
|/ / / / /
* | | | | Merge pull request #13450 from chancancode/ar_raise_on_conflictGodfrey Chan2014-01-298-9/+219
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Raise an error if `scope` or `enum` is about to add a conflicting method to the class Fixed #13389
| * | | | | `enum` now raises on "dangerous" name conflictsGodfrey Chan2014-01-293-3/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dangerous name conflicts includes instance or class method conflicts with methods defined within `ActiveRecord::Base` but not its ancestors, as well as conflicts with methods generated by other enums on the same class. Fixes #13389.
| * | | | | `scope` now raises on "dangerous" name conflictsGodfrey Chan2014-01-294-4/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to dangerous attribute methods, a scope name conflict is dangerous if it conflicts with an existing class method defined within `ActiveRecord::Base` but not its ancestors. See also #13389. *Godfrey Chan*, *Philippe Creux*
| * | | | | Fixed a bug in AR::Base#respond_to?Godfrey Chan2014-01-292-2/+11
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: >> ActiveRecord::Base.respond_to?(:find_by_something) NoMethodError: undefined method `abstract_class?' for Object:Class After: >> ActiveRecord::Base.respond_to?(:find_by_something) => false
* | | | | Update CHANGELOG properly with GH #13692 [ci-skip]Guillermo Iguaran2014-01-291-14/+14
| | | | |
* | | | | Merge pull request #13692 from lukesarnacki/change-default-session-serializerGuillermo Iguaran2014-01-2911-10/+121
|\ \ \ \ \ | | | | | | | | | | | | Allow session serializer key in config.session_store
| * | | | | Allow session serializer key in config.session_storeLukasz Sarnacki2014-01-2911-10/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MessageEncryptor has :serializer option, where any serializer object can be passed. This commit make it possible to set this serializer from configuration level. There are predefined serializers (:marshal_serializer, :json_serialzier) and custom serializer can be passed as String, Symbol (camelized and constantized in ActionDispatch::Session namepspace) or serializer object. Default :json_serializer was also added to generators to provide secure defalt.
* | | | | | Merge pull request #13868 from mauricio/bug-13788Yves Senn2014-01-293-1/+22
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Correctly send the string given to lock! and reload(:lock) to the lock scope - fixes #13788
| * | | | | Correctly send the string given to lock! and reload(:lock) to the lock scope ↵Mauricio Linhares2014-01-293-1/+22
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | - fixes #13788 As per the documentation at lock!, if the :lock option is a string it should use the given SQL to generate the lock statement.
* | | | | always use a block for cleanup / prepare callbacks so we can clean the ↵Aaron Patterson2014-01-281-0/+9
| | | | | | | | | | | | | | | | | | | | method signature
* | | | | scope is not necessaryAaron Patterson2014-01-281-2/+2
| | | | |
* | | | | Merge pull request #13864 from sowjumn/masterRafael Mendonça França2014-01-281-1/+6
|\ \ \ \ \ | | |/ / / | |/| | | Added documentation for css_compressor in asset_pipeline.md
| * | | | Added documentation for css_compressorsowjanya2014-01-281-1/+6
| | | | |
* | | | | Merge pull request #13813 from lukesarnacki/log-deep-mungeRafael Mendonça França2014-01-286-4/+77
|\ \ \ \ \ | | | | | | | | | | | | Log for which keys values were set to nil in deep_munge
| * | | | | Log which keys were set to nil in deep_mungeLukasz Sarnacki2014-01-286-4/+77
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | deep_munge solves CVE-2013-0155 security vulnerability, but its behaviour is definately confuisng. This commit adds logging to deep_munge. It logs keys for which values were set to nil. Also mentions in guides were added.