aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #10690 from robertomiranda/remove_mass_assignment_securityGuillermo Iguaran2015-01-091-7/+0
|\ \ | | | | | | Remove attributes_protected_by_default reference
| * | Remove attributes_protected_by_default reference, since ↵robertomiranda2015-01-091-7/+0
| | | | | | | | | | | | MassAssignmentSecurity was removed from ActiveModel f8c9a4d3e88181
* | | Add missing requireGuillermo Iguaran2015-01-091-0/+2
| |/ |/|
* | Add SecureRandom.base58Guillermo Iguaran2015-01-093-0/+45
|/
* Merge pull request #18426 from arthurnn/txn_refGodfrey Chan2015-01-091-3/+3
|\ | | | | Copy records to parent transaction should happen on TransactionManager
| * Copy records to parent transaction should happen on TransactionManagerArthur Neves2015-01-091-3/+3
| | | | | | | | It is up to the TransactionManager keep the state of current transaction, so after it commits it needs to copy any remaning record to the next current transaction
* | Merge pull request #18425 from arthurnn/kargs_transactionRafael Mendonça França2015-01-092-5/+5
|\| | | | | Use keyword args on committed! and rolledback!
| * Use keyword args on committed! and rolledback!Arthur Neves2015-01-092-5/+5
|/ | | | As discussed before, those methods should receive a keyword args instead of just parameters
* Properly copy nested bind values from subqueried relationsSean Griffin2015-01-092-12/+22
| | | | | | | | | | | This is cropping up all over the place. After a brief dive, I'm really not sure why we have `arel.bind_values` at all. A cursory grep didn't reveal where they're actually being assigned (it's definitely in AR, not in Arel). I'd like to dig further into it, as I'm fairly certain we don't actually need it, we just need a way for the predicate builder to communicate merged binds upstream. Fixes #18414
* Properly persist `lock_version` as 0 if the DB has no defaultSean Griffin2015-01-092-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | The reason this bug occured is that we never actually check to see if this column has changed from it's default, since it was never assigned and is not mutable. It appears I was wrong in b301c40224c6d15b539dbcc7485adb44d810f88c, with my statement of "there is no longer a case where a given value would differ from the default, but would not already be marked as changed." However, I chose not to revert the deletion of `initialize_internals_callback` from that commit, as I think a solution closer to where the problem lies is less likely to get erroneously removed. I'm not super happy with this solution, but it mirrors what is being done in `_update_record`, and a fix for one should work for the other. I toyed with the idea of changing the definition of `changed?` on the type to `changed_in_place?`. If we type cast the raw value, it'll break a test about updating not modifying the lock column if nothing else was changed. We could have the definition check if `raw_old_value` is `nil`, but this feels fragile and less intention revealing. It would, however, have the benefit of cleaning up old data that incorrectly persisted as `nil`. Fixes #18422
* Merge pull request #18390 from tgxworld/parallel_bundle_installRafael Mendonça França2015-01-091-1/+1
|\ | | | | Use parallel bundler install.
| * Use parallel bundler install.Guo Xiang Tan2015-01-101-1/+1
| | | | | | | | | | Travis recommends a default of 3. See: http://docs.travis-ci.com/user/languages/ruby/#Default-Test-Script
* | Merge pull request #18413 from brainopia/automatic_inverse_of_for_belongs_toDavid Heinemeier Hansson2015-01-095-31/+70
|\ \ | | | | | | Correctly count methods when using declarative `#test` in minitest
| * | Drop old test locations from `rake stats`brainopia2015-01-093-6/+8
| | | | | | | | | | | | | | | - test/functional - test/unit
| * | Update `rake counts` to count declarative tests in minitestbrainopia2015-01-093-25/+62
| | |
* | | Merge pull request #18423 from jone/remove-default-headerYves Senn2015-01-093-0/+35
|\ \ \ | | | | | | | | | | | | Default headers, removed in controller actions, will not be reapplied to the test response
| * | | Default headers, removed in controller actions, will not be reapplied to the ↵Jonas Baumann2015-01-093-0/+35
|/ / / | | | | | | | | | test response.
* | | Merge pull request #18416 from caike/masterRafael Mendonça França2015-01-093-6/+6
|\ \ \ | | | | | | | | Add _mailer suffix to i18n path
| * | | Add _mailer suffix to i18n pathCarlos Souza2015-01-083-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | For mailers created via generators Follow up to #18074
* | | | Merge pull request #18417 from ↵Sean Griffin2015-01-091-0/+3
|\ \ \ \ | |/ / / |/| | | | | | | | | | | yoshiokatsuneo/active_record_connection_pool_error_disconnect ActiveRecord: release connection on reconnect failure.
| * | | ActiveRecord: release connection on reconnect failure.Yoshioka Tsuneo2015-01-091-0/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to checkout connection from connection pool, checkout()(and checkout_and_verify) verify whether the connection is active or not. And, if the connection is not active, connection adapters try to reconnect to server. And, if database is down at this moment, reconnect fails and exception is raised. (Ex: Mysql2::Error: Can't connect to local MySQL server through socket xxx) But, ConnectionPool does not catch the exception, but leaks current disconnected connection to @connection. So, if database's temporary down happens several times and exceeds the number of connection pool(5 by default), activerecord will be no more available, even if database server is already recovered. This patch fix it by catching exception and releasing connection.
* | | Merge pull request #18410 from seuros/ripfilterRafael Mendonça França2015-01-083-9/+37
|\ \ \ | | | | | | | | remove *_filter
| * | | Deprecate all *_filter callbacks in favor of *_action callbacksAbdelkader Boudih2015-01-083-9/+37
|/ / /
* | | Merge pull request #18404 from claudiob/rebase-14549Rafael Mendonça França2015-01-082-0/+44
|\ \ \ | | | | | | | | Add test case and documentation for skip_before_filter.
| * | | Add test/doc for :if/:except in skip_before_actionclaudiob2015-01-082-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new test/docs further explain the conflicts that can happen when mixing `:if`/`:unless` options with `:only`/`:except` options in `skip_before_action`. The gist is that "positive" filters always have priority over negative ones. The previous commit already showed that `:only` has priority over `:if`. This commit shows that `:if` has priority over `:except`. For instance, the following snippets are equivalent: ```ruby skip_before_action :some_callback, if: -> { condition }, except: action ``` ```ruby skip_before_action :some_callback, if: -> { condition } ```
| * | | Add test case and documentation for skip_before_filter.Lauro Caetano2015-01-082-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test case for using skip_before_filter with the options :only and :if both present. In this case, the :if option will be ignored and :only will be executed. Closes #14549 (the commit was cherry-picked from there).
* | | | Fix the example (for realz)David Heinemeier Hansson2015-01-081-1/+1
| | | |
* | | | Fix the exampleDavid Heinemeier Hansson2015-01-081-1/+1
| | | |
* | | | Merge pull request #18334 from simi/prepend-false-for-protect-from-forgeryDavid Heinemeier Hansson2015-01-083-1/+91
|\ \ \ \ | | | | | | | | | | Add prepend option to protect_from_forgery.
| * | | | Add prepend option to protect_from_forgery.Josef Šimánek2015-01-083-1/+91
|/ / / /
* | | | Merge pull request #18371 from brainopia/remove_hide_actionsDavid Heinemeier Hansson2015-01-085-93/+7
|\ \ \ \ | |_|/ / |/| | | Remove ActionController::HideActions (closes #18336)
| * | | Remove ActionController::HideActions (closes #18336)brainopia2015-01-065-93/+7
| | | |
* | | | Document has_many :extend optionCaleb Thompson2015-01-081-0/+4
| |/ / |/| | | | | | | | https://github.com/rails/rails/commit/5937bd02dee112646469848d7fe8a8bfcef5b4c1#commitcomment-9205786
* | | Merge pull request #18403 from georgeclaghorn/enqueued-email-assertionsDavid Heinemeier Hansson2015-01-085-2/+144
|\ \ \ | | | | | | | | Enqueued email assertions
| * | | Add assert_enqueued_emails and assert_no_enqueued_emailsGeorge Claghorn2015-01-083-0/+115
| | | |
| * | | Add :only option to assert_no_enqueued_jobsGeorge Claghorn2015-01-082-2/+29
|/ / /
* | | Fix Active Job changelog formatting and reword a bit [ci skip]Carlos Antonio da Silva2015-01-081-24/+22
| | |
* | | Merge pull request #18397 from georgeclaghorn/enhance-job-assertionsDavid Heinemeier Hansson2015-01-073-7/+76
|\ \ \ | | | | | | | | Add :only option to assert_enqueued_jobs
| * | | Add :only option to assert_enqueued_jobsGeorge Claghorn2015-01-073-7/+76
|/ / / | | | | | | | | | With the option, assert_enqueued_jobs will check the number of times a specific kind of job is enqueued.
* | | Merge pull request #16640 from mfazekas/fix_loop_in_changed_for_autosaveGodfrey Chan2015-01-072-4/+21
|\ \ \ | | | | | | | | Fix potenital infinite recursion in changed_for_autosave?
| * | | Fix potenital stack level too deep with autosave or validationMiklos Fazkeas2015-01-042-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When associations checked for autosave have a cycle, and none of them is dirty, then changed_for_autosave? will be an infinite loop. We now remember if we're in the check and will short circuit the recursion.
* | | | Merge pull request #18377 from brainopia/custom_connection_with_countSean Griffin2015-01-072-1/+8
|\ \ \ \ | |_|_|/ |/| | | Fix count on a separate connection
| * | | Fix count on a separate connection (fixes #18359)brainopia2015-01-082-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previosly count and other AR calculations would convert column_name_for_operation to sql on a default Arel::Table.engine (AR::Base) connection. That could lead to trouble if current model has a connection to a different adapter or Base connection is inaccessible.
* | | | Merge pull request #18378 from ↵Carlos Antonio da Silva2015-01-072-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | shunsukeaida/avoid_orm_being_humanized_in_generator_help_message Overwrite descriptions generated by Generators::Base to respect acronym.
| * | | | acronyms like ORM should be in uppercase, so overwrite the desc generated by ↵shunsukeaida2015-01-072-2/+2
| | | | | | | | | | | | | | | | | | | | hook_for
* | | | | Move changelog entry to the top [ci skip]Carlos Antonio da Silva2015-01-071-7/+5
| |/ / / |/| | |
* | | | Merge pull request #18074 from caike/masterRafael Mendonça França2015-01-069-38/+58
|\ \ \ \ | |_|_|/ |/| | | Add _mailer suffix to generated file names.
| * | | Add mailer suffix to generated files and classesCarlos Souza2015-01-069-38/+58
| | | | | | | | | | | | | | | | | | | | Following the same naming convention used in controllers and jobs.
* | | | Use Ruby's #include? to avoid relying on AS extensionCarlos Antonio da Silva2015-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The build has failed when running the date/time ext tests in isolation due to the missing extension, so better than adding a require is using just Ruby in this case. https://travis-ci.org/rails/rails/jobs/46107954#L1077
* | | | Merge pull request #18368 from kuldeepaggarwal/fix-attribute-scopeCarlos Antonio da Silva2015-01-061-3/+1
|\ \ \ \ | | | | | | | | | | fix `attribute` method scoping(i.e. private)