aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Oops. :cut:Aaron Patterson2016-02-111-6/+0
|
* follow indentation rulesAaron Patterson2016-02-111-5/+11
|
* make the logger method always return somethingAaron Patterson2016-02-111-4/+9
| | | | then we can stop scattering nil checks (e.g. `try`) through the class.
* Merge pull request #18109 from k0kubun/unscoped-joinsSean Griffin2016-02-114-6/+29
|\ | | | | | | | | | | Allow `joins` to be unscoped Fixes #13775
| * Allow `joins` to be unscopedTakashi Kokubun2016-01-314-6/+31
| |
* | Merge pull request #23581 from diego-silva/uniqueness-validator-pk-fixSean Griffin2016-02-112-1/+12
|\ \ | | | | | | UniquenessValidator exclude itself when PK changed
| * | UniquenessValidator exclude itself when PK changedDiego Silva2016-02-092-1/+12
| | | | | | | | | | | | | | | | | | | | | When changing the PK for a record which has a uniqueness validation on some other attribute, Active Record should exclude itself from the validation based on the PK value stored on the DB (id_was) instead of its new value (id).
* | | Ensure prepared statement caching still occurs with Adequate RecordSean Griffin2016-02-114-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Rails 5, we're much more restrictive about when we do or don't cache a prepared statement. In particular, we never cache when we are sending an IN statement or a SQL string literal However, in the case of Adequate Record, we are *always* sending a raw SQL string, and we *always* want to cache the result. Fixes #23507 /cc @tgxworld
* | | Merge pull request #23605 from y-yagi/remove_warnings_in_finder_methodsKasper Timm Hansen2016-02-111-4/+4
|\ \ \ | | | | | | | | remove warnings from FinderMethods
| * | | remove warnings from FinderMethodsyuuji.yaginuma2016-02-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the following warnings. ``` activerecord/lib/active_record/relation/finder_methods.rb:252: warning: ambiguous first argument; put parentheses or a space even after `-' operator activerecord/lib/active_record/relation/finder_methods.rb:258: warning: ambiguous first argument; put parentheses or a space even after `-' operator activerecord/lib/active_record/relation/finder_methods.rb:268: warning: ambiguous first argument; put parentheses or a space even after `-' operator activerecord/lib/active_record/relation/finder_methods.rb:274: warning: ambiguous first argument; put parentheses or a space even after `-' operator ```
* | | | Merge pull request #23604 from tenderlove/sort-templatesAaron Patterson2016-02-101-4/+4
|\ \ \ \ | | | | | | | | | | sort templates after looking them up in the from the paths cache
| * | | | sort templates after looking them up in the from the paths cacheAaron Patterson2016-02-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The view paths cache will eventually query the filesystem when looking up templates: https://github.com/rails/rails/blob/2db347bebc9d3f39b3c5e274b7c9beecfce73913/actionview/lib/action_view/template/resolver.rb#L224-L230 The order in which files are returned is file system dependent. Since the template digest [depends on its children](https://github.com/rails/rails/blob/2db347bebc9d3f39b3c5e274b7c9beecfce73913/actionview/lib/action_view/digestor.rb#L109-L115), the order of the dependencies will impact the fingerprint. This commit sorts the wildcard dependencies so that we get a consistent hash. Fixes #23592
* | | | | Merge pull request #23606 from supremebeing7/patch-1Jon Moss2016-02-101-0/+22
|\ \ \ \ \ | | | | | | | | | | | | Update active_record_querying.md
| * | | | | Update active_record_querying.mdMark J. Lehman2016-02-101-0/+22
| | | | | | | | | | | | | | | | | | Added important distinction between scopes and class methods.
* | | | | | Merge pull request #23596 from afn/issue-23058Aaron Patterson2016-02-102-3/+3
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Converting backtrace to strings before calling set_backtrace
| * | | | | Converting backtrace to strings before calling set_backtraceTony Novak2016-02-102-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #23058
* | | | | | Merge pull request #23395 from PareshGupta/remove-unused-constantSantiago Pastorino2016-02-103-54/+5
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Remove unused ReaderMethodCache and WriterMethodCache constants from ActiveRecord
| * | | | | Remove unused class AttributeMethodCachePareshGupta2016-02-022-25/+0
| | | | | |
| * | | | | remove unused constants from activerecordPareshGupta2016-02-012-30/+6
| | | | | |
* | | | | | check `supports_view_paths?` at registration timeAaron Patterson2016-02-101-7/+9
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we check the conditional at registration time, then we can avoid the conditional at runtime. This commit checks for view path support when the handler is registered so that runtime calls to `find_dependencies` won't need to check the conditional. The idea is that `register_tracker` is called only once where `find_dependencies` may be called many times.
* | | | | build scope chain functionally and remove cachingAaron Patterson2016-02-101-14/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit walks the reflection tree and builds the scope chain functionally. It also removes the chain cache since the cache doesn't seem to have any impact on performance (I'd prefer to only cache at proven bottlenecks)
* | | | | Merge pull request #23597 from kaspth/integration-response-parsingKasper Timm Hansen2016-02-104-23/+94
|\ \ \ \ \ | | | | | | | | | | | | Add `response.parsed_body` to Integration Tests
| * | | | | Add request encoding and response parsing to changelog.Kasper Timm Hansen2016-02-101-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forgot to add this in the original pull request. No biggie, just show some examples.
| * | | | | Add `parsed_body` to spare writing out parsing routines.Kasper Timm Hansen2016-02-103-23/+56
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When testing: ```ruby post articles_path, params: { article: { title: 'Ahoy!' } }, as: :json ``` It's common to want to make assertions on the response body. Perhaps the server responded with JSON, so you write `JSON.parse(response.body)`. But that gets tedious real quick. Instead add `parsed_body` which will automatically parse the reponse body as what the last request was encoded `as`.
* | | | | Merge pull request #23528 from bensheldon/patch-1Richard Schneeman2016-02-101-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Set database poolsize via rails_max_threads
| * | | | | Set postgresql poolsize via RAILS_MAX_THREADSBen Sheldon2016-02-101-1/+1
| | | | | |
* | | | | | Merge pull request #23274 from KeithP/actioncable_loggingDavid Heinemeier Hansson2016-02-101-2/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | adds debug logging to actioncable connect
| * \ \ \ \ \ Merge remote-tracking branch 'origin/master' into actioncable_loggingkp2016-02-10258-1531/+3186
| |\ \ \ \ \ \ | | | |/ / / / | | |/| | | |
| * | | | | | Logs successful and invalid connections separatelykp2016-02-101-8/+12
| | | | | | |
| * | | | | | adds debug logging to actioncable connectkp2016-01-261-2/+12
| | | | | | |
* | | | | | | Merge pull request #23583 from brchristian/penultimateDavid Heinemeier Hansson2016-02-1010-2/+86
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | Array.second_to_last and Array.third_to_last access methods
| * | | | | | include activerecord and activesupport CHANGELOG entriesBrian Christian2016-02-102-0/+8
| | | | | | |
| * | | | | | rename to 'second_to_last' and 'third_to_last'Brian Christian2016-02-108-32/+32
| | | | | | |
| * | | | | | allow Array.penultimate and Array.antepenultiate access methodsBrian Christian2016-02-098-2/+78
| | |_|_|/ / | |/| | | |
* | | | | | Merge pull request #21671 from kaspth/integration-request-encoding-helpersDavid Heinemeier Hansson2016-02-102-4/+122
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add `as` to encode a request as a specific mime type.
| * | | | | | Add `as` to encode a request as a specific mime type.Kasper Timm Hansen2016-01-042-4/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns ``` post articles_path(format: :json), params: { article: { name: 'Ahoy!' } }.to_json, headers: { 'Content-Type' => 'application/json' } ``` into ``` post articles_path, params: { article: { name: 'Ahoy!' } }, as: :json ```
* | | | | | | Merge pull request #22772 from gsamokovarov/nack-template-errorDavid Heinemeier Hansson2016-02-101-0/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix edge case with ActionView::Template::Error reraise
| * | | | | | | Fix edge case with ActionView::Template::Error reraiseGenadi Samokovarov2015-12-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you re-raise an ActionView::Template::Error, the #cause can change. You can see this behaviour with [nack]. Currently, `web-console` doesn't run the console in the proper binding in the case of errors in the views, because when we follow the `#cause` of the exception it is an [`EOFError`][EOFError]. This also affects [pow] as it runs on [nack]. [nack]: https://github.com/josh/nack [pow]: http://pow.cx/ [EOFError]: https://github.com/josh/nack/blob/d523cc870c0a11dcf349388a15adfecba9314f97/lib/nack/server.rb#L108
* | | | | | | | Merge pull request #23512 from y-yagi/set_association_name_to_fixtureDavid Heinemeier Hansson2016-02-103-11/+10
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | set association name to generated fixtures if attribute is reference
| * | | | | | | | set association name to generated fixtures if attribute is referenceyuuji.yaginuma2016-02-063-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been changed to require `belongs_to` by default in Rails 5. Therefore in order to pass the controller test, have association of set to fixtures. Fixes #23384
* | | | | | | | | Merge pull request #23587 from wallclockbuilder/patch-1Vipul A M2016-02-101-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix tiny grammar.
| * | | | | | | | | Fix tiny grammar.Mawueli Kofi Adzoe2016-02-091-1/+1
|/ / / / / / / / /
* | | | | | | | | Merge pull request #23586 from jhcole/masterप्रथमेश Sonpatki2016-02-101-2/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix typo
| * | | | | | | | | Fix typoJohn Cole2016-02-091-2/+2
|/ / / / / / / / /
* | | | | | | | | Merge pull request #23584 from ↵Jon Moss2016-02-092-4/+4
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mgm702/fix_grammar_errors_in_security_and_migrations_docs_master Fix grammar errors in security and migrations docs master [ci skip]
| * | | | | | | | | Fixed grammatical errors in rails docs [ci skip]Matt Michnal2016-02-092-4/+4
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed errors in rails migrations docs [ci skip] Fixed errors in rails security docs [ci skip]
* | | | | | | | | prevent apps in the railties test suite from running the evented monitorXavier Noria2016-02-101-3/+12
| | | | | | | | |
* | | | | | | | | include spring-watcher-listen in the Gemfile of new applicationsXavier Noria2016-02-103-0/+9
| | | | | | | | |
* | | | | | | | | enables the evented monitor in new applicationsXavier Noria2016-02-105-1/+35
| |_|_|/ / / / / |/| | | | | | |
* | | | | | | | `log_process_action` will return an array, so use `empty?`Aaron Patterson2016-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to use active support in this case because we know the type that will be returned.