aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | | | | | Merge pull request #20542 from repinel/fix-bi-directional-assoc-docZachary Scott2015-06-131-12/+7
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Fix the API docs for Bi-directional associations
| * | | | | | | | | | | | | | [ci skip] Fix the API docs for Bi-directional associationsRoque Pinel2015-06-131-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The examples now take in consideration when Active Record finds inverse associations automatically.
* | | | | | | | | | | | | | | make it possible to customize the executable inside rereun snippets.Yves Senn2015-06-134-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the Rails repository we use a `bin/test` executable to run our tests. However the rerun snippets still included `bin/rails test`: BEFORE: ``` Failed tests: bin/rails test test/cases/adapters/postgresql/schema_test.rb:91 ``` AFTER: ``` Failed tests: bin/test test/cases/adapters/postgresql/schema_test.rb:91 ```
* | | | | | | | | | | | | | | let's use the latest bundler version.Yves Senn2015-06-131-1/+1
| | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | Merge pull request #20543 from spark008/patch-1Zachary Scott2015-06-131-0/+7
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / |/| | | | | | | | | | | | | | Add fixture use case to testing.md.
| * | | | | | | | | | | | | | Add fixture use case to testing.md.Staphany Park2015-06-131-0/+7
|/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think people would find it useful to know that you can pass in multiple fixture names to get an array of all the fixtures. I've found this useful in my own app. It looks like there already a test case that supports this feature (https://github.com/rails/rails/blob/master/activerecord/test/cases/fixtures_test.rb#L398), but it's just not documented here. I look forward to your feedback!
* | | | | | | | | | | | | | Merge pull request #19632 from greysteil/reorder-middlewareMatthew Draper2015-06-132-1/+9
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle param-parsing errors from Rack that happen low down the stack
| * | | | | | | | | | | | | | Handle param-parsing errors from Rack in ExceptionWrapperGrey Baker2015-06-122-1/+9
|/ / / / / / / / / / / / / /
* | | | | | | | | | | | | | Copy-edits in 04c349659bfd97f9eaf5266ef7a64b4eb367c6a8Rafael Mendonça França2015-06-121-1/+2
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Merge pull request #20539 from dcrec1/docRafael Mendonça França2015-06-121-0/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add doc about how empty serialization objects are persisted
| * | | | | | | | | | | | | | add doc about how empty serialization objects are persisted Diego Carrion2015-06-121-0/+2
|/ / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | the test case for this commit is in cd3f5db
* | / / / / / / / / / / / / Add a test to ensure `serialize` persists `nil` as `NULL`Sean Griffin2015-06-121-0/+8
| |/ / / / / / / / / / / / |/| | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #18365 from pocke/fix_datatime_compareAaron Patterson2015-06-123-1/+15
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | DateTime#<=> return nil when compare to the invalid String as Time.
| * | | | | | | | | | | | | DateTime#<=> return nil when compare to the invalid String as Time.pocke2015-01-063-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | before: p Time.now == 'a' # => false p Time.now <=> 'a' # => nil require 'active_support' require 'active_support/core_ext' p Time.now == 'a' # => false p Time.now <=> 'a' # => invalid date (ArgumentError) and on ruby 2.2, Time.now == 'a' warning. warning: Comparable#== will no more rescue exceptions of #<=> in the next release. warning: Return nil in #<=> if the comparison is inappropriate or avoid such comparison. after: - Error handling. - Quiet warnings.
* | | | | | | | | | | | | | Don't crash when mutating attributes in a getterSean Griffin2015-06-123-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a getter has side effects on the DB, `changes_applied` will be called twice. The second time will try and remove the changed attributes cache, and will crash because it's already been unset. This also demonstrates that we shouldn't assume that calling getters won't change the value of `changed_attributes`, and we need to clear the cache if an attribute is modified. Fixes #20531.
* | | | | | | | | | | | | | Merge pull request #20494 from ↵Rafael Mendonça França2015-06-122-1/+26
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | knovoselic/active_support_concern_class_methods_fix [ActiveSupport] Fix for #20489 - ActiveSupport::Concern#class_methods affects parent classes
| * | | | | | | | | | | | | | Fix for #20489 - ActiveSupport::Concern#class_methods affects parent classesKristijan Novoselic2015-06-122-1/+26
| | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | Merge pull request #20480 from senny/test_runnerYves Senn2015-06-1286-228/+285
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use our own runner for Rails framework components `bin/test`
| * | | | | | | | | | | | | | | select the AR adapter through `bin/test`.Yves Senn2015-06-117-2/+21
| | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | make it possible to run AR tests with bin/testYves Senn2015-06-1178-223/+230
| | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | use our runner (`bin/test`) for framework components.Yves Senn2015-06-116-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a script `bin/test` to most Rails framework components. The script uses the rails minitest plugin to augment the runner. See https://github.com/rails/rails/pull/19571 for details about the plugin. I did not yet add `bin/test` for activerecord, activejob and railties. These components rely on specific setup performed in the rake-tasks.
| * | | | | | | | | | | | | | | inline test runner check into `as/testing/autorun.rb`.Yves Senn2015-06-112-5/+9
| | |_|/ / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to easily get the runner working with existing setups that rely on `active_support/testing/autorun.rb`.
* | | | | | | | | | | | | | | Merge pull request #20226 from EpicH0liday/reversible-remove-foreign-keyYves Senn2015-06-124-2/+50
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make remove_foreign_key reversible Conflicts: activerecord/CHANGELOG.md
| * | | | | | | | | | | | | | | Add an invert method for remove_foreign_keyAster Ryan2015-06-114-2/+51
| | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | Merge pull request #19813 from igas/enum-prefixSean Griffin2015-06-126-6/+104
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add prefix option to enum definition
| * | | | | | | | | | | | | | | | Add enum prefix/suffix option to enum definitionIgor Kapkov2015-06-126-6/+104
| | |_|_|_|_|_|_|_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #17511 and #17415
* | | | | | | | | | | | | | | | Merge pull request #20526 from y-yagi/fix_doc_about_foreign_key_nameAbdelkader Boudih2015-06-121-1/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix doc about foreign key name [ci skip]
| * | | | | | | | | | | | | | | | fix doc about foreign key name [ci skip]yuuji.yaginuma2015-06-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this behavior was changed in b8e1f202676b4788c56241b124c401beff9f4014
* | | | | | | | | | | | | | | | | Merge pull request #20529 from pwnall/kwargs_docsRafael Mendonça França2015-06-121-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | Update RDoc for ActionController::TestCase for kwargs.
| * | | | | | | | | | | | | | | | Update RDoc for ActionController::TestCase for kwargs.Victor Costan2015-06-121-1/+1
|/ / / / / / / / / / / / / / / /
* | | | | | | | | | | | | | | | Merge pull request #20058 from farukaydin/cache-digests-dependency-rakeRafael Mendonça França2015-06-112-1/+22
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add error log that notify 'file not found' when using cache_digest dependency rake
| * | | | | | | | | | | | | | | | add error log that notify 'file not found' when using ↵Faruk AYDIN2015-05-072-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cache_digests:dependency and cache_digests:nested_dependency tasks
* | | | | | | | | | | | | | | | | Fix failing tests for Rails-APISean Griffin2015-06-111-1/+1
| |_|/ / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This looks to be just out of sync tests
* | | | | | | | | | | | | | | | Merge pull request #20522 from colby-swandale/doc-updateSean Griffin2015-06-111-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixed sring to be string in ActiveRecord::Base params documentation [ci skip]
| * | | | | | | | | | | | | | | | fixed sring to be string in ActiveRecord::Base params documentationColby Swandale2015-06-121-1/+1
| | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | assigns was removed from RailsRafael Mendonça França2015-06-111-1/+0
| | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | Add a missing test case for the persistence behavior of `serialize`Sean Griffin2015-06-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `serialize` makes the contract that if it is given a class name, it will never return something other than an instance of that class. This means that it must cast `nil` to the empty form of that object. As such, we should then persist empty forms of that object as `nil`. While this is techincally under the contract of ``` model.attribute = value assert_equal model.attribute, model.tap(&:save).reload.attribute ``` which we can't actually test universally without property based testing, it has come up more than once and is worth calling out specifically since we aren't looking to change it.
* | | | | | | | | | | | | | | | | Credit the author of #20515 in the previous commitSean Griffin2015-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Sean Griffin & jmondo]
* | | | | | | | | | | | | | | | | Correctly handle array columns with defaults in the schema dumperSean Griffin2015-06-114-0/+17
| |_|/ / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the subtype provides custom schema dumping behavior, we need to defer to it. We purposely choose not to handle any values other than an array (which technically should only ever be `nil`, but I'd rather code defensively here). Fixes #20515.
* | | | | | | | | | | | | | | | Merge pull request #19832 from spastorino/rails-apiSantiago Pastorino2015-06-1145-32/+1497
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails api
| * | | | | | | | | | | | | | | | head :no_content is implicitly calledSantiago Pastorino2015-06-111-2/+0
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Mention that doing nothing in Rails API controllers returns 204Santiago Pastorino2015-06-111-1/+1
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Return 204 if render is not called in API controllersJorge Bejar2015-06-115-6/+31
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Add test coverage for implicit render in empty actionsJorge Bejar2015-06-111-0/+14
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Checking if controller responds to wrap_parameter is not longer requiredJorge Bejar2015-06-111-1/+1
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Enable wrap_parameter by default in rails api applicationsJorge Bejar2015-06-112-5/+1
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Include ParamsWrapper in AC::APIJorge Bejar2015-06-112-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ParamsWrapper was initially removed from API controllers according to the following discusision: https://github.com/rails-api/rails-api/issues/33 However, we're including it again so Rails API devs can decide whether to enable or disable it.
| * | | | | | | | | | | | | | | | Add rake-cors gem (commented) in Gemfile for rails api appsJorge Bejar2015-06-113-0/+20
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Make Rails API apps return the full resource on updateSantiago Pastorino2015-06-112-2/+2
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | It's rails new my_api --apiSantiago Pastorino2015-06-111-1/+1
| | | | | | | | | | | | | | | | |