aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Avoid E constant clashing with Minitest defined version.Kasper Timm Hansen2015-05-228-43/+45
| | | | | | | | | | | | | | | | | | | | | | | | | Minitest sets an E constant to an empty string to save GC time. This clashes with autoloading tests which define an E constant.
* | | | | Merge pull request #20350 from kddeisz/enumerable_pluckRafael Mendonça França2015-05-283-0/+20
|\ \ \ \ \ | | | | | | | | | | | | Add Enumerable#pluck.
| * | | | | Add Enumerable#pluck.Kevin Deisz2015-05-283-0/+20
| | |/ / / | |/| | | | | | | | | | | | | Allows fetching the same values from arrays as from ActiveRecord associations.
* | | | | Merge pull request #20347 from repinel/fix-reflection-shadowingRafael Mendonça França2015-05-281-2/+2
|\ \ \ \ \ | |/ / / / |/| | | | Fix the shadowing warning for `reflection`
| * | | | Fix the shadowing warning for `reflection`Roque Pinel2015-05-281-2/+2
|/ / / /
* | | | Persist user provided default values, even if unchangedSean Griffin2015-05-284-27/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a usability change to fix a quirk from our definition of partial writes. By default, we only persist changed attributes. When creating a new record, this is assumed that the default values came from the database. However, if the user provided a default, it will not be persisted, since we didn't see it as "changed". Since this is a very specific case, I wanted to isolate it with the other quirks that come from user provided default values. The number of edge cases which are presenting themselves are starting to make me wonder if we should just remove the ability to assign a default, in favor of overriding `initialize`. For the time being, this is required for the attributes API to not have confusing behavior. We had to delete one test, since this actually changes the meaning of `.changed?` on Active Record models. It now specifically means `changed_from_database?`. While I think this will make the attributes API more ergonomic to use, it is a subtle change in definition (though not a backwards incompatible one). We should probably figure out the right place to document this. (Feel free to open a PR doing that if you're reading this). /cc @rafaelfranca @kirs @senny This is an alternate implementation of #19921. Close #19921. [Sean Griffin & Kir Shatrov]
* | | | Allow proc defaults with the Attributes APISean Griffin2015-05-283-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a variant implementation of the changes proposed in #19914. Unlike that PR, the change in behavior is isolated in its own class. This is to prevent wonky behavior if a Proc is assigned outside of the default, and it is a natural place to place the behavior required by #19921 as well. Close #19914. [Sean Griffin & Kir Shatrov]
* | | | Merge pull request #20017 from eliotsykes/configurable-static-index-filenameRafael Mendonça França2015-05-2812-8/+65
|\ \ \ \ | | | | | | | | | | | | | | | config.static_index configures directory Index "index.html" filename
| * | | | config.static_index configures directory index "index.html" filenameEliot Sykes2015-05-2812-8/+65
| | |/ / | |/| | | | | | | | | | | | | | | | | | Set `config.static_index` to serve a static directory index file not named `index`. For example, to serve `main.html` instead of `index.html` for directory requests, set `config.static_index` to `"main"`.
* | | | Merge pull request #20331 from arunagw/arunagw-remove-unused-package-tasksRafael Mendonça França2015-05-288-62/+2
|\ \ \ \ | | | | | | | | | | Remove unused package tasks
| * | | | Remove unused package tasksArun Agrawal2015-05-288-62/+2
| |/ / / | | | | | | | | | | | | We are using `all:build` now.
* | | | Merge pull request #20344 from jcockhren/fix_docs_presence_validationLauro Caetano2015-05-281-1/+0
|\ \ \ \ | | | | | | | | | | removed erroneous line. Corrected presence validation example.
| * | | | removed erroneous line. Corrected presence validation example.Jurnell Cockhren2015-05-281-1/+0
|/ / / / | | | | | | | | | | | | | | | | Addresses #20343. Removes erroneous line of code in the sample codeblock.
* | | | Merge pull request #20313 from s3ymd/masterArthur Nogueira Neves2015-05-281-1/+1
|\ \ \ \ | | | | | | | | | | [ci skip] Fix block parameter of assert_no_difference
| * | | | [ci skip] Fix block parameter of assert_no_differenceHiromichi Yamada2015-05-281-1/+1
| | | | |
* | | | | Merge pull request #20336 from vngrs/deprecate_nothing_option_for_render_methodSantiago Pastorino2015-05-2813-49/+38
|\ \ \ \ \ | |/ / / / |/| | | | Deprecate `:nothing` option for render method
| * | | | Deprecate `:nothing` option for render methodMehmet Emin İNAÇ2015-05-2813-49/+38
| |/ / / | | | | | | | | | | | | `head` method works similar to `render` method with `:nothing` option
* | | | Merge pull request #20332 from henders/shender/changelog_reload_creditArun Agrawal2015-05-281-2/+2
|\ \ \ \ | |/ / / |/| | | Give credit to extra contributor for Base.reload fix
| * | | Give credit to extra contributor for Base.reload fixShane Hender2015-05-281-2/+2
|/ / /
* | | Merge pull request #20196 from huoxito/preload-association-and-mergesRafael Mendonça França2015-05-282-2/+50
|\ \ \ | | | | | | | | Properly append preload / includes args on Merger
| * | | Properly append preload / includes args on MergerWashington Luiz2015-05-282-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Couldn't find other way to get the association name from a given class other than looping through `reflect_on_all_associations` reflections .. Noticed this one while looking at this example: ```ruby class Product < ActiveRecord::Base has_many :variants has_many :translations end class Translation < ActiveRecord::Base belongs_to :product end class Variant < ActiveRecord::Base belongs_to :product end class BugTest < Minitest::Test def test_merge_stuff product = Product.create! name: 'huhu' variant = Variant.create! product_id: product.id Translation.create! locale: 'en', product_id: product.id product_relation = Product.all .preload(:translations) .joins(:translations) .merge(Translation.where(locale: 'en')) .where(name: 'huhu') assert_equal variant, Variant.joins(:product).merge(product_relation).first end end ```
* | | | Merge pull request #20263 from arunagw/aa-remove-custom-lines-actionviewRafael Mendonça França2015-05-281-21/+3
|\ \ \ \ | | | | | | | | | | Remove custom `lines` and use `/tools/line_statistics`
| * | | | Remove custom `lines` and use `/tools/line_statistics`Arun Agrawal2015-05-221-21/+3
| | | | |
* | | | | Merge pull request #20041 from akshay-vishnoi/sqlite_collationRafael Mendonça França2015-05-286-9/+139
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | SQLite3: Add collation support for string and text columns
| * | | | | Add collation support for string and text columns in SQLite3Akshay Vishnoi2015-05-286-9/+139
| | | | | |
* | | | | | Add test to 57daaefRafael Mendonça França2015-05-281-1/+1
| | | | | |
* | | | | | Allow Relation#compact using delegationJordan Raine2015-05-281-1/+1
|/ / / / /
* | | | | Merge pull request #20329 from EduardoBautista/json-api-supportRafael Mendonça França2015-05-271-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Add application/vnd.api+json alias to the JSON MIME Type.
| * | | | | Add application/vnd.api+json alias to the JSON MIME Type.Eduardo Bautista2015-05-271-1/+1
| | |/ / / | |/| | |
* | | | | Merge pull request #20171 from georgeclaghorn/enums-in-fixturesRafael Mendonça França2015-05-276-32/+64
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Allow the use of symbols or strings to specify enum values in test fixtures
| * | | | | Resolve enums in test fixturesGeorge Claghorn2015-05-276-32/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, values for columns backing Active Record enums must be specified as integers in test fixtures: awdr: title: "Agile Web Development with Rails" status: 2 rfr: title: "Ruby for Rails" status: <%= Book.statuses[:proposed] %> This is potentially confusing, since enum values are typically specified as symbols or strings in application code. To resolve the confusion, this change permits the use of symbols or strings to specify enum values: awdr: status: :published It is compatible with fixtures that specify enum values as integers.
* | | | | | Merge pull request #19886 from henders/henders/reload_wipe_query_cacheRafael Mendonça França2015-05-273-1/+34
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Cause ActiveRecord::Base::reload to also ignore the QueryCache.
| * | | | | | Cause ActiveRecord::Base::reload to also ignore the QueryCache.Shane Hender2015-04-282-1/+30
| | | | | | |
* | | | | | | Merge pull request #17654 from kamipo/strict_mode_explicitlyRafael Mendonça França2015-05-273-2/+22
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | If specify `strict: :default` explicitly, do not set sql_mode.
| * | | | | | If specify `strict: :default` explicitly, do not set sql_mode.Ryuta Kamizono2015-05-263-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Related with #17370.
* | | | | | | Merge pull request #20269 from wojobucco/masterRafael Mendonça França2015-05-273-4/+9
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Changed mysqldump to include sprocs and functions
| * | | | | | | Changed mysqldump to include sprocs and functionsJonathan Worek2015-05-222-4/+5
| | | | | | | |
* | | | | | | | Merge pull request #20326 from hderms/dh/fix_task_bugRafael Mendonça França2015-05-272-16/+66
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix rake method definition leaking onto Object
| * | | | | | | | add fixed fileDermot Haughey2015-05-272-16/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add framework_test add another test
* | | | | | | | | :bomb: Fix another leftoverRafael Mendonça França2015-05-271-1/+1
| | | | | | | | |
* | | | | | | | | Fix file nameRafael Mendonça França2015-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a leftover of #19867
* | | | | | | | | Merge pull request #19808 from byroot/action-parameterRafael Mendonça França2015-05-272-15/+32
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | [PoC] Stop shadowing parameters named `action`
| * | | | | | | | | Allow to parameters named `action` or `controller` from AC::TestCase helpersJean Boussier2015-04-182-15/+32
| | | | | | | | | |
* | | | | | | | | | Merge pull request #19867 from radar/rename-app-rails-loaderRafael Mendonça França2015-05-274-14/+14
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Remove redundant 'Rails' from Rails::AppRailsLoader constant
| * | | | | | | | | | Remove redundant 'Rails' from Rails::AppRailsLoader constantRyan Bigg2015-05-214-14/+14
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #20327 from yoongkang/ajaxZachary Scott2015-05-271-1/+1
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / |/| | | | | | | | | | [ci-skip] Replace dead link about HttpOnly cookies.
| * | | | | | | | | | [ci skip] Replace dead link about HttpOnly cookies.Yoong Kang Lim2015-05-281-1/+1
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #20316 from ↵Rafael Mendonça França2015-05-271-0/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vngrs/add_assertion_for_get_method_into_request_test Add assertion for get? method into test cases
| * | | | | | | | | | | Add assertion for get? method into test casesMehmet Emin İNAÇ2015-05-271-0/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Merge pull request #20321 from vngrs/fix_indentation_warningRafael Mendonça França2015-05-271-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Fix indentation warning on active_support ordered_options