aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #30211 from koic/frozen_activestorageMatthew Draper2017-08-1375-4/+149
|\ | | | | Use frozen string literal in Active Storage
| * Use frozen string literal in Active StorageKoichi ITO2017-08-1275-4/+149
| |
* | Merge pull request #30079 from ↵Matthew Draper2017-08-132-11/+11
|\ \ | | | | | | | | | | | | kamipo/move_test_not_compatible_with_serialize_macro Move `test_not_compatible_with_serialize_macro` to `JSONSharedTestCases`
| * | Move `test_not_compatible_with_serialize_macro` to `JSONSharedTestCases`Ryuta Kamizono2017-08-112-11/+11
| | | | | | | | | | | | Because `JSONSharedTestCases` is also used for `Mysql2JSONTest`.
* | | Merge pull request #30222 from kamipo/respect_pk_typeMatthew Draper2017-08-131-5/+3
|\ \ \ | | | | | | | | Use `references` to respect primary key type in active storage tables
| * | | Use `references` to respect primary key type in active storage tablesRyuta Kamizono2017-08-131-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | If created active storage tables by mysql2 or postgresql adapters, a primary key is defined as a bigint. It should be used `references` to the reference columns to respect primary key type.
* | | | Merge pull request #30226 from kamipo/delegate_to_enumerable_findMatthew Draper2017-08-132-17/+14
|\ \ \ \ | |/ / / |/| | | Delegate to `Enumerable#find` for `CollectionProxy`
| * | | Delegate to `Enumerable#find` for `CollectionProxy`Ryuta Kamizono2017-08-132-17/+14
|/ / / | | | | | | | | | | | | Since `Relation` includes `Enumerable`, it is enough to use `super` simply.
* | | Merge pull request #30209 from kamipo/remove_duplicated_table_nameRafael França2017-08-121-8/+0
|\ \ \ | | | | | | | | Remove duplicated `table_name`
| * | | Remove duplicated `table_name`Ryuta Kamizono2017-08-121-8/+0
| | |/ | |/| | | | | | | It can use `AbstractReflection#table_name` simply.
* / | Test for the new exception of delegate_missing_to (#30191)Anton Khamets2017-08-123-3/+22
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add test for the new exception of delegate_missing_to * Add a changelog entry * Only check for nil if NoMethodError was raised * Make method private * Have to pass both target name and value * Inline the re-raise [Rafael Mendonça França + Anton Khamets]
* | Fix outdated comment for `Core::ClassMethods#===` [ci skip] (#30146)Ryuta Kamizono2017-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This comment was added at 97849de, but `AssociationProxy` and `test_triple_equality` was removed at 1644663. Currently the `===` is used for `test_decorated_polymorphic_where` that added at #11945. So I updated "association proxies" to "decorated models". And also, currently `Core::ClassMethods` appears in the doc. http://api.rubyonrails.org/classes/ActiveRecord/Core/ClassMethods.html But it looks like that the methods in the module is not public API. So I also added `# :nodoc:` to the module.
* | Merge pull request #30166 from yhirano55/fix_generator_method_environmentRafael Mendonça França2017-08-114-19/+99
|\ \ | | | | | | | | | Optimize indentation for generator actions
| * | Optimize indentation for generator actionsYoshiyuki Hirano2017-08-114-19/+99
| | |
* | | Merge pull request #30165 from tjschuck/code_formatting_fixRafael França2017-08-111-10/+10
|\ \ \ | | | | | | | | Add code formatting and minor grammar clarifications
| * | | Add code formatting and minor grammar clarificationsT.J. Schuck2017-08-091-10/+10
| | | | | | | | | | | | [ci skip]
* | | | Merge pull request #30126 from ↵Rafael França2017-08-114-12/+26
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | chopraanmol1/support_for_has_many_and_has_one_for_where_relation Fixed query building when relation is passed for has one or has many association in where
| * | | | Changed join_fk private method to join_foreign_key public methodchopraanmol12017-08-093-15/+11
| | | | |
| * | | | Currently if relation object are passed to where condition for has one or ↵chopraanmol12017-08-083-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | has many association wrong set of primary key and foreign key are selected. Changed code to use 'join' primary key and foreign key over 'association' primary key and foreign key.
* | | | | Merge pull request #29559 from kirs/eager-load-controller-actionsRafael França2017-08-113-0/+72
|\ \ \ \ \ | | | | | | | | | | | | Eager load controller actions to reduce response time of the first request
| * | | | | Eager load controller and mailer actionsKir Shatrov2017-07-293-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the first request, ActionController::Base#action_methods computes and memoized the list of available actions [1]. With this PR we move this expensive operation into eager load step to reduce response time of the first request served in production. This also reduces the memory footprint when running on forking server like Unicorn. [1] https://github.com/rails/rails/blob/a3813dce9a0c950a4af7909111fa730a2622b1db/actionpack/lib/abstract_controller/base.rb#L66-L77
* | | | | | Merge pull request #30114 from yhirano55/remove_empty_line_from_dummy_manifestRafael França2017-08-111-1/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | Removed empty line from dummy_manifest
| * | | | | | Removed empty line from dummy_manifestYoshiyuki Hirano2017-08-071-1/+0
| | |/ / / / | |/| | | |
* | | | | | Merge pull request #30103 from yahonda/has_one_associations_failuresRafael França2017-08-111-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add `:authors` to address random failures at HasOneAssociationsTest
| * | | | | | Add `:authors` fixture to address two random failures at HasOneAssociationsTestYasuo Honda2017-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sqlite3 - 2 failures ```ruby $ ARCONN=sqlite3 bin/test test/cases/associations/has_one_associations_test.rb test/cases/view_test.rb --seed 48032 -n "/^(?:ViewWithoutPrimaryKeyTest#(?:test_attributes)|HasOneAssociationsTest#(?:test_destroyed_by_association_set_in_child_destroy_callback_on_parent_destroy|test_destroyed_by_association_set_in_child_destroy_callback_on_replace))$/" --verbose Using sqlite3 Run options: --seed 48032 -n "/^(?:ViewWithoutPrimaryKeyTest#(?:test_attributes)|HasOneAssociationsTest#(?:test_destroyed_by_association_set_in_child_destroy_callback_on_parent_destroy|test_destroyed_by_association_set_in_child_destroy_callback_on_replace))$/" --verbose ViewWithoutPrimaryKeyTest#test_attributes = 0.02 s = . HasOneAssociationsTest#test_destroyed_by_association_set_in_child_destroy_callback_on_replace = 0.12 s = F HasOneAssociationsTest#test_destroyed_by_association_set_in_child_destroy_callback_on_parent_destroy = 0.01 s = F Finished in 0.162504s, 18.4610 runs/s, 18.4610 assertions/s. 1) Failure: HasOneAssociationsTest#test_destroyed_by_association_set_in_child_destroy_callback_on_replace [/home/yahonda/git/rails/activerecord/test/cases/associations/has_one_associations_test.rb:725]: Expected true to be nil or false 2) Failure: HasOneAssociationsTest#test_destroyed_by_association_set_in_child_destroy_callback_on_parent_destroy [/home/yahonda/git/rails/activerecord/test/cases/associations/has_one_associations_test.rb:715]: Expected true to be nil or false 3 runs, 3 assertions, 2 failures, 0 errors, 0 skips ``` * mysql2 - 1 failure ``` $ ARCONN=mysql2 bin/test test/cases/associations/has_one_associations_test.rb test/cases/view_test.rb --seed 48032 -n "/^(?:ViewWithoutPrimaryKeyTest#(?:test_attributes)|HasOneAssociationsTest#(?:test_destroyed_by_association_set_in_child_destroy_callback_on_parent_destroy|test_destroyed_by_association_set_in_child_destroy_callback_on_replace))$/" --verbose Using mysql2 Run options: --seed 48032 -n "/^(?:ViewWithoutPrimaryKeyTest#(?:test_attributes)|HasOneAssociationsTest#(?:test_destroyed_by_association_set_in_child_destroy_callback_on_parent_destroy|test_destroyed_by_association_set_in_child_destroy_callback_on_replace))$/" --verbose ViewWithoutPrimaryKeyTest#test_attributes = 0.07 s = . HasOneAssociationsTest#test_destroyed_by_association_set_in_child_destroy_callback_on_replace = 0.27 s = F HasOneAssociationsTest#test_destroyed_by_association_set_in_child_destroy_callback_on_parent_destroy = 0.02 s = . Finished in 0.362779s, 8.2695 runs/s, 8.2695 assertions/s. 1) Failure: HasOneAssociationsTest#test_destroyed_by_association_set_in_child_destroy_callback_on_replace [/home/yahonda/git/rails/activerecord/test/cases/associations/has_one_associations_test.rb:725]: Expected true to be nil or false 3 runs, 3 assertions, 1 failures, 0 errors, 0 skips ``` * postgresql - 0 failures ```ruby $ ARCONN=postgresql bin/test test/cases/associations/has_one_associations_test.rb test/cases/view_test.rb --seed 48032 -n "/^(?:ViewWithoutPrimaryKeyTest#(?:test_attributes)|HasOneAssociationsTest#(?:test_destroyed_by_association_set_in_child_destroy_callback_on_parent_destroy|test_destroyed_by_association_set_in_child_destroy_callback_on_replace))$/" --verbose Using postgresql Run options: --seed 48032 -n "/^(?:ViewWithoutPrimaryKeyTest#(?:test_attributes)|HasOneAssociationsTest#(?:test_destroyed_by_association_set_in_child_destroy_callback_on_parent_destroy|test_destroyed_by_association_set_in_child_destroy_callback_on_replace))$/" --verbose ViewWithoutPrimaryKeyTest#test_attributes = 0.06 s = . HasOneAssociationsTest#test_destroyed_by_association_set_in_child_destroy_callback_on_parent_destroy = 0.22 s = . HasOneAssociationsTest#test_destroyed_by_association_set_in_child_destroy_callback_on_replace = 0.02 s = . Finished in 0.311217s, 9.6396 runs/s, 9.6396 assertions/s. 3 runs, 3 assertions, 0 failures, 0 errors, 0 skips ```
* | | | | | | Merge pull request #30116 from ↵Rafael Mendonça França2017-08-113-1/+32
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | yhirano55/skip_unused_components_when_running_rails_command_in_plugin Skip unused components when running `bin/rails` in Rails plugin
| * | | | | | | Skip unused components when running in Rails pluginYoshiyuki Hirano2017-08-093-1/+32
| | | | | | | |
* | | | | | | | Merge pull request #30105 from bogdanvlviv/remove-sorted-test_orderRafael França2017-08-111-2/+0
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Remove :sorted test order for isolated tests
| * | | | | | | | Remove :sorted test order for isolated testsbogdanvlviv2017-08-071-2/+0
| | | | | | | | |
* | | | | | | | | Merge pull request #30198 from betesh/activestorage-rack-test-uploaded-fileRafael França2017-08-112-2/+8
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Activestorage rack test uploaded file
| * | | | | | | | | Make activestorage treat Rack::Test::UploadedFile just like ↵Isaac Betesh2017-08-112-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActionDispatch::Http::UploadedFile
* | | | | | | | | | Merge pull request #30110 from yhirano55/add_git_sourceRafael Mendonça França2017-08-113-0/+10
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add git_source to Gemfile for plugin generator
| * | | | | | | | | | Add git_source to Gemfile for plugin generatorYoshiyuki Hirano2017-08-093-0/+10
| | |_|/ / / / / / / | |/| | | | | | | |
* | | | | | | | | | Merge pull request #30060 from bdewater/aj-callback-docsRafael França2017-08-111-22/+30
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Improve callback examples in Active Job guide
| * | | | | | | | | | Make one line example fit on one line [ci skip]Bart de Water2017-08-091-3/+1
| | | | | | | | | | |
| * | | | | | | | | | Improve callback examples in Active Job guide [ci skip]Bart de Water2017-08-031-22/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The advice for symbol/block form is taken from the Active Record guides.
* | | | | | | | | | | Merge pull request #30159 from allcentury/dump-temp-file-permissionsRafael França2017-08-111-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Use copy to preserve file permissions
| * | | | | | | | | | | Use copy to preserve file permissionsAnthony Ross2017-08-091-1/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Merge pull request #30092 from bogdanvlviv/prevent-generation-extra-empty-linesRafael França2017-08-112-7/+6
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent generation extra empty lines in a plugin's Rakefile
| * | | | | | | | | | | | Prevent generation extra empty lines in a plugin's Rakefilebogdanvlviv2017-08-092-7/+6
| | |_|_|_|_|/ / / / / / | |/| | | | | | | | | |
* | | | | | | | | | | | Merge pull request #30147 from yhirano55/fix_trailing_blank_linesRafael França2017-08-112-2/+0
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | [Active Storage] `rubocop -a --only Layout/TrailingBlankLines`
| * | | | | | | | | | | | [Active Storage] `rubocop -a --only Layout/TrailingBlankLines`Yoshiyuki Hirano2017-08-093-3/+1
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #30113 from dixpac/remove_unecessary_require_in_test_helperRafael França2017-08-111-2/+0
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActiveStorage: Remove unnecessary require in test_helper
| * | | | | | | | | | | | | Remove unecessary require in test_helperdixpac2017-08-091-2/+0
| |/ / / / / / / / / / / /
* | | | | | | | | | | | | Remove unnedded Active Storage installation stepsRafael Mendonça França2017-08-111-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Active Storage was now merged to master and it is automatically installed in a new application.
* | | | | | | | | | | | | Merge pull request #29720 from gaurish/ar_find_error_message_improvementRafael França2017-08-114-7/+11
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return Not found Ids in ActiveRecord::NotFound
| * | | | | | | | | | | | | Return Not found Ids in ActiveRecord::NotFoundGaurish Sharma2017-07-294-7/+11
| | |_|_|_|_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This builds on top of 15e2da656f41af0124f7577858536f3b65462ad5. now it also returns exact Ids which were not found which will be debugging simple.
* | | | | | | | | | | | | Merge pull request #30193 from zverok/robust-postgres-duplicate-dbRafael França2017-08-111-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | More robust PostgreSQL database duplication check
| * | | | | | | | | | | | | Update database duplication checkzverok2017-08-111-1/+1
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Merge pull request #30201 from ↵Rafael França2017-08-111-12/+8
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/eval_active_storage_attached_name_only_once Evaluate `@active_storage_attached_#{name}` only once