aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Allow non-English values for collection_radio_buttons/check_boxescolorfulfool2017-08-022-1/+15
|
* Merge pull request #29724 from eugeneius/sync_primary_keyMatthew Draper2017-08-024-5/+57
|\ | | | | Sync transaction state when accessing primary key
| * Sync transaction state when accessing primary keyEugene Kenny2017-07-094-5/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a record is modified inside a transaction, it must check the outcome of that transaction before accessing any state which would no longer be valid if it was rolled back. For example, consider a new record that was saved inside a transaction which was later rolled back: it should be restored to its previous state so that saving it again inserts a new row into the database instead of trying to update a row that no longer exists. The `id` and `id=` methods defined on the PrimaryKey module implement this correctly, but when a model uses a custom primary key, the reader and writer methods for that attribute must check the transaction state too. The `read_attribute` and `write_attribute` methods also need to check the transaction state when accessing the primary key.
* | Merge pull request #30015 from larskanis/use-duktake-on-mingwGuillermo Iguaran2017-08-012-0/+4
|\ \ | | | | | | Use duktape gem as default JS engine on Windows-MINGW
| * | Use duktape gem as default JS engine on Windows-MINGW and MS-Visual-C buildsLars Kanis2017-08-012-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | The fallback javascript engine on Windows is Windows Script Host (JScript). However this engine isn't able to process the default assets, because it supports ES3 only but the coffeescript compiler requires ES5. Fixes #30014
* | | Update working_with_javascript_in_rails.mdGuillermo Iguaran2017-08-011-1/+1
| | |
* | | Clarify route encoding testeileencodes2017-08-011-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this test changed in 9220935 I noticed that it really doesn't make sense anymore. I split the tests into 2 groups to explain what each one does. First these routes should throw a `bad_request` when the encoding isn't valid. We're expecting UTF8 encoding and passing binary, that should be a bad request. For the second test we are setting the `show` route to set `self.binary_params_for?` for that route which will convert the parameters and return a `:ok` instead of a `:bad_request`.
* | | Merge pull request #30023 from y-yagi/remove_unnecessary_doc_directory_deletionGuillermo Iguaran2017-08-012-2/+0
|\ \ \ | | | | | | | | Remove unnecessary `doc` directory deletion
| * | | Remove unnecessary `doc` directory deletionyuuji.yaginuma2017-08-012-2/+0
| | | | | | | | | | | | | | | | Since 553b695, `doc` directory is not created in application.
* | | | Update working_with_javascript_in_rails.mdGuillermo Iguaran2017-08-011-1/+1
| | | |
* | | | Path parameters should default to UTF8eileencodes2017-08-015-14/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the behavior such the path_params now default to UTF8 just like regular parameters. This also changes the behavior such that if a path parameter contains invalid UTF8 it returns a 400 bad request. Previously the behavior was to encode the path params as binary but that's not the same as query params. So this commit makes path params behave the same as query params. It's important to test with a path that's encoded as binary because that's how paths are encoded from the socket. The test that was altered was changed to make the behavior for bad encoding the same as query params. We want to treat path params the same as query params. The params in the test are invalid UTF8 so they should return a bad request. Fixes #29669 *Eileen M. Uchitelle, Aaron Patterson, & Tsukuru Tanimichi*
* | | | Merge pull request #30029 from yhirano55/fix_rails_command_commentsSean Griffin2017-08-011-3/+3
|\ \ \ \ | | | | | | | | | | [ci skip] Fix rails_command comments
| * | | | [ci skip] Fix rails_command commentsYoshiyuki Hirano2017-08-011-3/+3
| | | | |
* | | | | Merge pull request #30021 from roberts1000/fix-rubocop-issuesRafael França2017-08-012-3/+3
|\ \ \ \ \ | | | | | | | | | | | | Fix rubocop issues
| * | | | | Fix rubocop style issues in yarn and spring.rb templates"roberts10002017-07-312-3/+3
| | |/ / / | |/| | |
* | | | | Merge pull request #30024 from kamipo/remove_redundant_unless_branchSean Griffin2017-07-311-2/+0
|\ \ \ \ \ | | | | | | | | | | | | Remove redundant `unless current_adapter?(:OracleAdapter)`
| * | | | | Remove redundant `unless current_adapter?(:OracleAdapter)`Ryuta Kamizono2017-07-281-2/+0
| | | | | |
* | | | | | Talk about bytes not charactersRafael Mendonça França2017-07-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Closes #30012
* | | | | | Add backticks around method [ci skip]Ryuta Kamizono2017-08-011-1/+1
| |/ / / / |/| | | | | | | | | | | | | | And make reference to `Relation`.
* | | | | Merge pull request #30017 from bslobodin/fix-typo-in-assert-changesRafael França2017-07-311-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Fix typo in assert_changes error message
| * | | | | fix typo in assert_changes error messageBoris Slobodin2017-07-311-1/+1
| | | | | |
* | | | | | Merge pull request #30016 from ↵Guillermo Iguaran2017-07-315-0/+25
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | albertoalmagro/set-ruby-version-in-gemfile-and-ruby-version-by-default Set Ruby version in Gemfile and .ruby-version by default
| * | | | | Set Ruby version in Gemfile and .ruby-version by defaultAlberto Almagro2017-07-315-0/+25
|/ / / / /
* | | | | Merge pull request #29950 from MaxLap/avoid_or_clause_duplicatesSean Griffin2017-07-313-6/+66
|\ \ \ \ \ | |_|_|/ / |/| | | | Avoid duplicate clauses when using #or
| * | | | Edits following the reviewsMaxime Lapointe2017-07-282-27/+43
| | | | |
| * | | | Avoid duplicate clauses when using #orMaxime Lapointe2017-07-253-9/+53
| | | | | | | | | | | | | | | | | | | | | | | | | Condenses the clauses that are common to both sides of the OR and put them outside, before the OR This fix the current behavior where the number of conditions is exponential based on the number of times #or is used.
* | | | | Merge pull request #30001 from y-yagi/fix_test_directoryKasper Timm Hansen2017-07-303-3/+3
|\ \ \ \ \ | | | | | | | | | | | | Fix test directory to correct path
| * | | | | Fix test directory to correct pathyuuji.yaginuma2017-07-303-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Together, fix to the following lint violation. ``` rails/actionview/test/ujs/public/test/data-confirm.js 303:11 error Strings must use singlequote quotes rails/actionview/test/ujs/public/test/data-remote.js 414:32 error Extra semicolon semi ✖ 2 problems (2 errors, 0 warnings) ```
* | | | | | Merge pull request #29951 from georgeclaghorn/action-view-test-flowKasper Timm Hansen2017-07-302-0/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix testing helpers that use Action View's capturing helpers (e.g. content_for)
| * | | | | | Fix testing helpers that use Action View's capturing helpers (e.g. content_for)George Claghorn2017-07-252-0/+10
| | |/ / / / | |/| | | |
* | | | | | Fix github user output.Kasper Timm Hansen2017-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | [ Orhan Toy & Kasper Timm Hansen ]
* | | | | | Merge pull request #29963 from y-yagi/fix_ruby_warningsKasper Timm Hansen2017-07-301-3/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix `warning: method redefined;`
| * | | | | | Fix `warning: method redefined;`yuuji.yaginuma2017-07-281-3/+3
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following warning: ``` /tmp/d20170727-7039-kmdtb1/app/app/models/user.rb:5: warning: method redefined; discarding old model_name rails/activemodel/lib/active_model/naming.rb:222: warning: previous definition of model_name was here ```
* | | | | | Merge pull request #30002 from y-yagi/change_http_postgresql_links_to_httpsVipul A M2017-07-308-32/+32
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Change http postgresql.org links to https [ci skip]
| * | | | | Change http postgresql.org links to https [ci skip]yuuji.yaginuma2017-07-308-32/+32
|/ / / / / | | | | | | | | | | | | | | | | | | | | It seems that it accepts only HTTPS connections. Ref: https://github.com/postgres/postgres/commit/7f77cbd996855a06fb742ea11adbe55c42b48fe2
* | | | | Merge pull request #29933 from kirs/frozen-actionpackMatthew Draper2017-07-29281-3/+563
|\ \ \ \ \ | |_|_|/ / |/| | | | Use frozen string literal in actionpack/
| * | | | Use frozen string literal in actionpack/Kir Shatrov2017-07-29281-3/+563
|/ / / /
* | | | Merge pull request #29946 from kamipo/passing_arel_to_where_is_boundableSean Griffin2017-07-281-4/+1
|\ \ \ \ | | | | | | | | | | Building `where_clause` in `UniquenessValidator` is no longer needed
| * | | | Building `where_clause` in `UniquenessValidator` is no longer neededRyuta Kamizono2017-07-261-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building `where_clause` manually was introduced at #26073 to include both `comparison` and `binds` in `where_clause`. Since 213796f, `comparison` includes `binds`, so it is enough to use `where` simply.
* | | | | Merge pull request #29979 from kamipo/use_build_bind_attributeSean Griffin2017-07-284-8/+7
|\ \ \ \ \ | | | | | | | | | | | | Use `predicate_builder.build_bind_attribute` wherever possible
| * | | | | Use `predicate_builder.build_bind_attribute` wherever possibleRyuta Kamizono2017-07-284-8/+7
| | |_|/ / | |/| | | | | | | | | | | | | For less duplicated code.
* | | | | Add missing support for modulo operations on durationsSayan Chakraborty2017-07-283-14/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails 5.1 introduce an `ActiveSupport::Duration::Scalar` class as a wrapper around a numeric value as a way of ensuring a duration was the outcome of an expression. However the implementation was missing support for modulo operations. This commit adds support for those operations and should result in a duration being returned from expressions involving them. Fixes #29603 and #29743.
* | | | | Merge pull request #29982 from ydakuka/patch-1Robin Dupret2017-07-281-3/+3
|\ \ \ \ \ | | | | | | | | | | | | [ci skip] update routing guide
| * | | | | Squashed commit of the following:ydakuka2017-07-281-3/+3
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 4a3d295f3011e771cddead80de7497ca15d15c13 Author: Yauheni Dakuka <yauheni.dakuka@gmail.com> Date: Fri Jul 28 14:31:35 2017 +0300 Update routing.md commit 620a4ce47288e3ef6504290c78f931214968e7e3 Author: Yauheni Dakuka <yauheni.dakuka@gmail.com> Date: Fri Jul 28 14:19:29 2017 +0300 [ci skip] update routing guide
* | | | | Merge pull request #29980 from ydakuka/patch-1Robin Dupret2017-07-281-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | [ci skip] update routing guide
| * | | | [ci skip] update routing guideYauheni Dakuka2017-07-281-1/+1
|/ / / /
* | | | Eager load the association classes on bootRafael Mendonça França2017-07-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were expecting those classes to be loaded when an association is defined but they are not. If you add a debugger on the first line of any of those classes and try to define the corresponding association you will see that the classes are not loaded. Fixes #26273
* | | | Merge pull request #29971 from rails/fix-duration-divisionAndrew White2017-07-273-15/+28
|\ \ \ \ | | | | | | | | | | Fix division where a duration is the denominator
| * | | | Fix division where a duration is the denominatorAndrew White2017-07-273-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR #29163 introduced a change in behavior when a duration was the denominator in a calculation - this was incorrect as dividing by a duration should always return a `Numeric`. The behavior of previous versions of Rails has been restored. Fixes #29592.
* | | | | Merge pull request #28695 from koic/integer_type_has_precision_option_in_oracleAkira Matsuda2017-07-271-1/+5
|\ \ \ \ \ | |/ / / / |/| | | | Fix an AR test of schema dump when using Oracle