aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* implement `requirements` in terms of routesAaron Patterson2015-08-141-1/+1
|
* implement the `asts` method in terms of paths / patternsAaron Patterson2015-08-141-12/+11
| | | | Eventually I want to eliminate the FakeSet test class
* extract ast finding to a methodAaron Patterson2015-08-141-9/+13
| | | | | I'm going to reimplement this using route objects, so it will be easier if we just change ast access to go through a method rather than hashes
* stop adding path_info to the conditions hashAaron Patterson2015-08-143-11/+9
| | | | we don't need to keep adding it and deleting if from hashes.
* pull up path normalization.Aaron Patterson2015-08-141-18/+18
| | | | | Eventually I want to pull up AST generation so that we don't have to add it to the `conditions` hash.
* Merge pull request #20647 from twalpole/method_source_dependencyRafael Mendonça França2015-08-142-0/+2
|\ | | | | Add method_source dependency to activesupport
| * Add method_source dependency to activesupportThomas Walpole2015-07-292-0/+2
| |
* | Remove install.rbRafael Mendonça França2015-08-141-13/+0
| | | | | | | | We already have rake install command that does the same thing.
* | Merge pull request #21234 from ↵Rafael Mendonça França2015-08-141-5/+2
|\ \ | | | | | | | | | | | | ixkaito/version_is_needless_when_running_installrb Remove `version` argument in install.rb
| * | Remove `version` argument in install.rbKite2015-08-141-5/+2
| | |
* | | Merge pull request #21236 from jonatack/fix-middleware-deprecation-messagesKasper Timm Hansen2015-08-141-1/+1
|\ \ \ | |/ / |/| | Fix middleware deprecation message. Related to #21172.
| * | Fix middleware deprecation message. Related to #21172.Jon Atack2015-08-141-1/+1
|/ /
* | Merge pull request #21225 from brooksreese/sql_is_made_up_of_statementsClaudio B.2015-08-131-1/+1
|\ \ | | | | | | [ci skip] SQL is written using statements, not sentences
| * | [ci skip] SQL is written using statements, not sentencesBrooks Reese2015-08-131-1/+1
| | |
* | | `build_path` doesn't need the path variable anymoreAaron Patterson2015-08-131-2/+2
| | | | | | | | | | | | | | | It just constructs a Path::Pattern object with the AST that it already has
* | | remove StrexpAaron Patterson2015-08-138-115/+73
| | | | | | | | | | | | | | | This was a useless object. We can just directly construct a Path::Pattern object without a Strexp object.
* | | pass anchor directly to `Pattern`Aaron Patterson2015-08-137-50/+47
| | | | | | | | | | | | | | | the caller already has it, there is no reason to pack it in to an object and just throw that object away.
* | | we already have access to the AST, so just use itAaron Patterson2015-08-131-3/+3
| | |
* | | remove default arguments that aren't usedAaron Patterson2015-08-131-1/+1
| | | | | | | | | | | | | | | we always pass all parameters, so there is no reason to provide default arguments.
* | | pull up options_constrants extractionAaron Patterson2015-08-132-17/+16
| | |
* | | remove `as`Aaron Patterson2015-08-132-9/+8
| | | | | | | | | | | | the caller already has access to `as`, so we can stop passing it around.
* | | remove anchor from mappingAaron Patterson2015-08-132-9/+8
| | | | | | | | | | | | | | | | | | the same value that is extracted from the options hash earlier is returned, so we don't need to pass it in in the first place. The caller already has the data, so stop passing it around.
* | | pull `anchor` extraction upAaron Patterson2015-08-132-18/+17
| | | | | | | | | | | | | | | this way we don't have to mutate the options hash so far away from where the user passed it in
* | | Merge pull request #19683 from tristang/require-option-for-counter-cacheRafael Mendonça França2015-08-137-6/+56
|\ \ \ | | | | | | | | | | | | Require explicit counter_cache option for has_many
| * | | Add tests for associations without counter_cacheTristan Gamilis2015-04-094-0/+43
| | | | | | | | | | | | | | | | | | | | Assert that counter_cache behaviour is not used on belongs_to or has_many associations if the option is not given explicitly.
| * | | Require explicit counter_cache option for has_manyTristan Gamilis2015-04-073-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously has_many associations assumed a counter_cache was to be used based on the presence of an appropriately named column. This is inconsistent, since the inverse belongs_to association will not make this assumption. See issues #19042 #8446. This commit checks for the presence of the counter_cache key in the options of either the has_many or belongs_to association as well as ensuring that the *_count column is present.
* | | | raise if `anchor` is passed to `scope`Aaron Patterson2015-08-132-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | The `anchor` parameter [is overridden](https://github.com/rails/rails/blob/b4b4a611d0eb9aa1c640c5f521c6a43bf2a65bab/actionpack/lib/action_dispatch/routing/mapper.rb#L1528) unless it is directly passed to `match`, so setting it in a scope must be a mistake.
* | | | Merge pull request #19770 from vngrs/prevent_duplicated_where_clausesRafael Mendonça França2015-08-133-0/+14
|\ \ \ \ | |_|/ / |/| | | Prevent duplicating `where` clauses
| * | | Prevent duplicating `where` clauses when model is extended from an abstract ↵Mehmet Emin İNAÇ2015-04-153-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | class Fixes #19528 fix for mysql2 test better test
* | | | descriptive error message when fixtures contian a missing column.Yves Senn2015-08-134-2/+21
| | | | | | | | | | | | | | | | Closes #21201.
* | | | Merge pull request #21120 from dhiachou/patch-1Robin Dupret2015-08-131-5/+12
|\ \ \ \ | | | | | | | | | | How to pass arguments to ActiveJob Jobs [ci skip]
| * | | | [ci skip] How to pass arguments to ActiveJob JobsDhia Eddine Chouchane2015-08-131-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A section explaining how to pass arguments to Jobs has been added. [ci skip] How to pass arguments to ActiveJob Jobs Removed the "how to pass arguments" from what you will know section [ci skip] improving Enqueue Job section Using GuestsCleanupJob rather than MyJob for coherence. [ci skip] Passing args section merged with enqueuing jobs Passing args is now explained through examples withing Enqueuing the Jobs section [ci skip] Unnecessary example removed [ci skip] Typo fixed (missing as)
* | | | | Merge pull request #21221 from alietz/doc-asset-pipeline-clarificationRobin Dupret2015-08-131-4/+4
|\ \ \ \ \ | | | | | | | | | | | | [ci skip] Clarified asset pipeline guide
| * | | | | [ci skip] Clarified asset pipeline guideAndreas Lietz2015-08-131-4/+4
|/ / / / /
* | | | | implement `provider_job_id` for `queue_classic`.Yves Senn2015-08-135-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latest, currently unreleased, version of queue_classic is required for this to work. See https://github.com/QueueClassic/queue_classic/pull/262 for more details.
* | | | | Merge pull request #21025 from ronakjangir47/assertsKasper Timm Hansen2015-08-132-1/+18
|\ \ \ \ \ | | | | | | | | | | | | Added helper methods to stub any instance
| * | | | | Added helper methods to stub any instanceRonak Jangir2015-08-132-1/+18
| | | | | |
* | | | | | use `assert_not` instead of `refute` as mentioned in our guides.Yves Senn2015-08-137-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As described in the "Follow Coding Conventions" section in our contribution guide (http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions) we favor `assert_not` over `refute`. While we don't usually make stylistic changes on it's own I opted to do it in this case. The reason being that test cases are usually copied as a starting point for new tests. This results in a spread of `refute` in files that have been using it already.
* | | | | | Merge pull request #21219 from repinel/assert-human-size-prefix-deprecatedYves Senn2015-08-131-8/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | Assert that the `:prefix` option of `number_to_human_size` is deprecated
| * | | | | | Assert that the `:prefix` option of `number_to_human_size` is deprecatedRoque Pinel2015-08-121-8/+10
| | | | | | |
* | | | | | | Merge pull request #21021 from sgrif/sg-no-routes-commentSean Griffin2015-08-121-54/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Replace the giant comment in routes.rb with a link to the guides
| * | | | | | | Replace the giant comment in routes.rb with a link to the guidesSean Griffin2015-07-241-54/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This comment not only serves no purpose, but in my experience is actively detrimental to new developers getting started with Rails. Expereinced developers just end up deleting this comment, and are annoyed that they had to take this step. I also spend a lot of time mentoring brand new developers, and a consistent theme I've seen is that this comment just ends up intimidating them, and making them think it's dangerous to edit this file. One of my students just said this (due to the number of comments which even new developers don't actually read, they just see it as a sign that this thing is "dangerous"). > I don't edit any file that Rails generates for me, until my instructor > says that it's OK to do so. Realistically, this comment adds 0 value. We have very good documentation, which we can just link to instead. If someone is truly new enough to benefit from this info, they presumably just ran `gem install rails`, and have an internet connection that they can use to read the routing guide. The choice of language here was very specific. I chose "the DSL available" over "what is possible", because a consistent theme I've noticed among my students is that they aren't aware that this is actually a Ruby file, and can write any Ruby code here that they want. This file is not the only offender, but is by far the biggest point of pain that I've seen, and felt it was a good spot to open this discussion.
* | | | | | | | Merge pull request #21217 from myrridin/myrridin-documentation-updatesZachary Scott2015-08-122-4/+4
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | [ci skip] Documentation: Switch around a common phrase for readability
| * | | | | | | | [ci skip] Switch around a common idiom for readabilityThomas Hart II2015-08-052-4/+4
| | | | | | | | |
* | | | | | | | | remove the `add_request_method` methodAaron Patterson2015-08-121-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I didn't like this method because it mutates the parameters. Now that the method is so small, just push it up to `initialize`
* | | | | | | | | Skip statement cache on through association readerRafael Mendonça França2015-08-1211-21/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the through class has default scopes we should skip the statement cache. Closes #20745.
* | | | | | | | | remove side effects in `normalize_defaults`Aaron Patterson2015-08-121-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | now the `@defaults` variable doesn't need to be set before calling `normalize_defaults`
* | | | | | | | | remove unnecessary deletesAaron Patterson2015-08-121-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These three options are stored in the `scope` chain outside of the options hash. If they are in the options hash, then someone passed them in to `match` and they don't really do anything. So lets remove the code.
* | | | | | | | | pull `format` out of the options hashAaron Patterson2015-08-121-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove `format` from the options hash in the scope chain so that we don't need to remove it later
* | | | | | | | | pull `formatted` up the stackAaron Patterson2015-08-122-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this reduces the number of times we have to mutate the options hash.