aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [CI SKIP] Doc fix.Guo Xiang Tan2014-07-151-2/+2
|
* Merge pull request #16089 from ↵Aaron Patterson2014-07-143-101/+158
|\ | | | | | | | | eileencodes/refactor-reflections-from-sub-classes-to-delegates Refactor reflections from sub classes to delegates
| * Begin refactoring ThroughReflectioneileencodes2014-07-083-101/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to decouple AssociationReflection and ThroughReflection making ThroughReflection it's own Reflection bucket in a way. The benefit of this is to be able to remove checks against the macro's symbol for exmaple `macro == :belongs_to`. Get all tests passing again Some of the methods that used to be inherited from MacroReflection through AssociationReflection were no longer getting passed through. They needed to be duplicated into the ThroughReflection. I will extract these out into a separate class. Refactor shared methods into strategy object Now that we've separated ThroughReflection and AssociationReflection we can combine shared methods into one class to avoid duplication. Break out class for each type of reflection This creates a class for each reflection type (has_many, has_one, belongs_to and habtm). We then can remove the need to set the macro symbol in each initialization. Tests were updated to reflect these changes because creation of these reflections is now different. Remove need for @collection instance var We now define `collection?` as `false` by default and set it to `true` in `has_and_belongs_to_many` and `has_many` reflections. This removes the need for the `@collection` instance variable. Raise exception on unknown macro types We shouldn't accept just any macro when creating reflections. An unrecongnized AssociationReflection raises an error. Tests in `reflection_test` were updated to reflect these new changes. `:has_and_belongs_to_many` macro tests were removed because we no longer internally return HABTM.
* | Merge pull request #16168 from greysteil/stash-path-infoMatthew Draper2014-07-143-2/+15
|\ \ | | | | | | Stash original path in `ShowExceptions` middleware
| * | Stash original path in `ShowExceptions` middlewareGrey Baker2014-07-143-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ActionDispatch::ShowExceptions` overwrites `PATH_INFO` with the status code for the exception defined in `ExceptionWrapper`, so the path the user was visiting when an exception occurred was not previously available to any custom exceptions_app. The original `PATH_INFO` is now stashed in `env["action_dispatch.original_path"]`.
* | | Merge pull request #16167 from yahonda/ora972_facesMatthew Draper2014-07-143-4/+5
|\ \ \ | | | | | | | | Address ORA-00972: identifier is too long when tested with Oracle
| * | | Address ORA-00972: identifier is too long when tested with OracleYasuo Honda2014-07-143-4/+5
|/ / / | | | | | | | | | by using shorter attribute names.
* | | Merge pull request #16127 from Envek/fix_16111Matthew Draper2014-07-143-1/+32
|\ \ \ | | | | | | | | Dump PostgreSQL primary key with custom function as a default.
| * | | Dump PostgreSQL primary key with custom function as a default.Andrey Novikov2014-07-113-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, if use pgcrypto extension in PostgreSQL 9.4 beta 1, where uuid-ossp extension isn't available for moment of writing, and thus to use a gen_random_uuid() method as a primary key default. In this case schema dumper wasn't able to correctly reconstruct create_table statement and lost primary key constraint on schema load. Fixes #16111.
* | | | Merge pull request #16156 from mechanicles/document-improvementZachary Scott2014-07-131-1/+1
|\ \ \ \ | | | | | | | | | | [ci skip] Improve documentation consistency for ActiveModel::Errors
| * | | | [ci skip] Little bit doc code improvement.Santosh Wadghule2014-07-141-1/+1
| | |/ / | |/| |
* | | | Format pass on 4.2 release notes [ci skip]Godfrey Chan2014-07-131-157/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Leave two blank lines between sections/packages for readibility. * Always indent bullet points with four spaces. This allows multi-paragraph points to align properly (see #16103), and it is the same as the format we already use in CHANGELOGs. Doing this consistently sets an easy precedent for future contributors to follow. * Always put the PR/commit link on its own line in the source. If the bullet point spans multiple paragraphs, put it on its own paragraph at the end. [Godfrey Chan & Juanito Fatas]
* | | | Merge pull request #16155 from mechanicles/fix-typosZachary Scott2014-07-133-4/+4
|\ \ \ \ | |/ / / |/| | | [ci skip] Fix typos like `a html` to `an html` and 'an mail' to 'an email'.
| * | | Fix typos like `a html` to `an html` and 'an mail' to 'an email'. [ci skip]Santosh Wadghule2014-07-143-4/+4
|/ / /
* | | Merge pull request #16150 from sferik/fix-testsMatthew Draper2014-07-131-1/+1
|\ \ \ | | | | | | | | Fix tests broken in #16149
| * | | Fix tests broken in https://github.com/rails/rails/pull/16149Erik Michaels-Ober2014-07-121-1/+1
|/ / /
* | | Merge pull request #16149 from sferik/refactor-transform_valuesGuillermo Iguaran2014-07-124-2/+50
|\ \ \ | | | | | | | | Refactor Hash#transform_values and Hash#transform_values!
| * | | Return an Enumerator if no block is givenErik Michaels-Ober2014-07-124-1/+49
| | | |
| * | | Don't construct a Proc if no block is givenErik Michaels-Ober2014-07-121-1/+1
|/ / /
* | | Merge pull request #16147 from seuros/templatesMatthew Draper2014-07-122-0/+2
|\ \ \ | | | | | | | | [Bug report templates] Added rack master to the Gemfile [ci skip]
| * | | [Bug report templates] Added rack master to the GemfileAbdelkader Boudih2014-07-122-0/+2
|/ / /
* | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2014-07-121-113/+93
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/base.rb
| * | | fix mismatched example call [ci skip]Vijay Dev2014-07-121-2/+2
| | | |
| * | | Revert "[ci skip] Fix doc for except"Vijay Dev2014-07-121-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0f6b101e09d210cea2494c5d4225760f1951ea67. Reason: It's better to let `unscope` be documented. We can add a separate section for `except`.
| * | | Prefer find_by over where.first for recordGaurish Sharma2014-07-071-1/+1
| | | |
| * | | [ci skip] remove invalid code from docsschneems2014-06-281-2/+0
| | | |
| * | | [ci skip] Fix doc for exceptschneems2014-06-281-5/+4
| | | | | | | | | | | | | | | | The example showed is `except`, however the method "documented" is `unstop`. Fix to align the docs to the example.
| * | | [ci skip] Doc ability to chain in `find_each`schneems2014-06-281-1/+9
| | | | | | | | | | | | | | | | Also use appropriate mailer syntax in the `find_each` block.
| * | | [ci skip] Consolidate docs for `find`schneems2014-06-281-25/+19
| | | | | | | | | | | | | | | | Put all options for overloading `find` in one section
| * | | [ci skip] Consolidate docs for `last`schneems2014-06-281-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | Add docs on what happens when a numerical argument is provided to last. Since `last!` behaves exactly the same way but can raise an argument we can consolidate it in the `last` section.
| * | | [ci skip] Consolidate docs for `take`schneems2014-06-281-35/+20
| | | | | | | | | | | | | | | | | | | | | | | | Add docs on what happens when a numerical argument is provided to take. Since `take!` behaves exactly the same way but can raise an argument we can consolidate it in the `take` section.
| * | | [ci skip] Consolidate docs for `find_by`schneems2014-06-281-19/+14
| | | | | | | | | | | | | | | | Since `find_by!` behaves exactly the same way but can raise an argument we can consolidate it in the `find_by` section.
| * | | [ci skip] Consolidate docs for `first`schneems2014-06-281-35/+21
| | | | | | | | | | | | | | | | | | | | | | | | Add docs for `first` when provided a numerical argument. Since `first!` behaves exactly the same way but can raise an argument we can consolidate it in the `first` section.
| * | | [ci skip] Add return values to examplesschneems2014-06-281-1/+10
| | | |
* | | | Assert the nature of the original exceptionMatthew Draper2014-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Just so it's clearer what's going on in the following assertion. /cc #11993 @robin850
* | | | Merge pull request #16143 from robin850/silence-downloading-outputRafael Mendonça França2014-07-111-1/+0
|\ \ \ \ | | | | | | | | | | Silence Downloader's output
| * | | | Silence the output downloading a fileRobin Dupret2014-07-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This output isn't used anywhere for assertions so we can simply remove it. The introducing commit was f238d495.
* | | | | Merge pull request #16144 from grekko/patch-1Richard Schneeman2014-07-111-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Fixing typo in comment
| * | | | | Fixing typo in commentGregory Igelmund2014-07-121-1/+1
|/ / / / /
* | | | | Merge pull request #11993 from razielgn/actionview-use-name-to-inspect-errorGuillermo Iguaran2014-07-111-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | Use NameError#name to assert raised error.
| * | | | Use NameError#name to assert raised error.Federico Ravasio2013-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This makes the test compatible with other Ruby implementations, which may implement error messages differently.
* | | | | Merge pull request #16136 from sgrif/sg-pg-bit-stringMatthew Draper2014-07-122-13/+33
|\ \ \ \ \ | | | | | | | | | | | | Don't rely on the column SQL type for bit string quoting
| * | | | | Don't rely on the column SQL type for bit string quotingSean Griffin2014-07-112-13/+33
| | | | | |
* | | | | | Merge pull request #16055 from sgrif/sg-refactor-sqlite3-stringsMatthew Draper2014-07-122-14/+29
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Use a type object for type casting behavior on SQLite3
| * | | | | Use a type object for type casting behavior on SQLite3Sean Griffin2014-07-112-14/+29
| | | | | |
* | | | | | Merge pull request #16135 from mgoldWork/validator-guide-sentence-breakXavier Noria2014-07-111-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | [Guides] Sentence break for clarity [ci-skip]
| * | | | | | [Guides] Sentence break for clarity [ci-skip]Max Goldstein2014-07-111-2/+2
|/ / / / / /
* | | | | | Merge pull request #16132 from tgxworld/fix_test_not_unsubscribingSantiago Pastorino2014-07-111-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix incorrect unsubscription.
| * | | | | | Fix incorrect unsubscription.Guo Xiang Tan2014-07-111-2/+2
| | | | | | |
* | | | | | | Merge pull request #16133 from Agis-/cookie_overflow_checkSantiago Pastorino2014-07-112-2/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Use `#bytesize` instead of `#size` when checking for cookie overflow