aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | Prefer ImageProcessing's resize_to_limit macro over resize_to_fitGeorge Claghorn2019-01-249-20/+20
| |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | Don't upsize images smaller than the specified dimensions.
* | | | | | | Allow `column_exists?` to be passed `type` argument as a stringRyuta Kamizono2019-01-242-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently `conn.column_exists?("testings", "created_at", "datetime")` returns false even if the table has the `created_at` column. That reason is that `column.type` is a symbol but passed `type` is not normalized to symbol unlike `column_name`, it is surprising behavior to me. I've improved that to normalize a value before comparison.
* | | | | | | Merge pull request #35040 from colorbox/fix_formatting_in_action_text_docsYuji Yaginuma2019-01-242-4/+4
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | Fix document formatting on Action Text docs [ci skip]
| * | | | | | Fix document formatting on Action Text docs [ci skip]colorbox2019-01-242-4/+4
|/ / / / / / | | | | | | | | | | | | | | | | | | Use `+` instead of backquote.
* | | | | | Merge pull request #35031 from rails/view-ivarAaron Patterson2019-01-232-9/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | Pass the view around instead of using an ivar
| * | | | | | Pass the view around instead of using an ivarAaron Patterson2019-01-232-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we pass the view instance around it's easier to understand the flow control.
* | | | | | | Tell the user what to use instead of update_attributes/!Xavier Noria2019-01-231-2/+2
| |/ / / / / |/| | | | |
* | | | | | Merge pull request #35029 from dylanahsmith/fix-strictly-cast-attribute-typesRyuta Kamizono2019-01-242-1/+7
|\ \ \ \ \ \ | |/ / / / / |/| | | | | activerecord: Fix statement cache for strictly cast attributes
| * | | | | activerecord: Fix statement cache for strictly cast attributesDylan Thacker-Smith2019-01-232-1/+7
|/ / / / /
* | | | | Merge pull request #34993 from schuetzm/allow-subdomains-of-localhostRafael França2019-01-232-1/+6
|\ \ \ \ \ | | | | | | | | | | | | Subdomains of localhost are safe against DNS rebinding
| * | | | | Subdomains of localhost are safe against DNS rebindingMarc Schütz2019-01-232-1/+6
| | |/ / / | |/| | |
* | | | | Merge pull request #35027 from sponomarev/chore/fix-ac-test-typoKasper Timm Hansen2019-01-231-2/+0
|\ \ \ \ \ | |_|_|_|/ |/| | | | Fix attribute typo in ActionCable connection test request
| * | | | Fix attribute typo in ActionCable connection test requestSergey Ponomarev2019-01-231-2/+0
|/ / / /
* | | | Merge pull request #35024 from calasyr/patch-1George Claghorn2019-01-221-1/+1
|\ \ \ \ | | | | | | | | | | Corrected spelling of ActionCable::Connection::TestCase [ci skip]
| * | | | Corrected spelling of ActionCable::Connection::TestCaseAlan Brown2019-01-221-1/+1
|/ / / /
* | | | Merge pull request #35018 from gmcgibbon/revert_redirect_to_allow_other_hostRafael França2019-01-228-79/+21
|\ \ \ \ | | | | | | | | | | Revert ensure external redirects are explicitly allowed
| * | | | Revert ensure external redirects are explicitly allowedGannon McGibbon2019-01-228-79/+21
| | | | |
* | | | | Merge pull request #35010 from Edouard-chin/ec-numericality-validator-fixRafael França2019-01-222-8/+16
|\ \ \ \ \ | | | | | | | | | | | | Fix NumericalityValidator on object responding to `to_f`:
| * | | | | Fix NumericalityValidator on object responding to `to_f`:Edouard CHIN2019-01-222-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - If you had a PORO that acted like a Numeric, the validator would work correctly because it was previously using `Kernel.Float` which is implicitely calling `to_f` on the passed argument. Since rails/rails@d126c0d , we are now using `BigDecimal` which does not implicitely call `to_f` on the argument, making the validator fail with an underlying `TypeError` exception. This patch replate the `is_decimal?` check with `Kernel.Float`. Using `Kernel.Float` as argument for the BigDecimal call has two advantages: 1. It calls `to_f` implicetely for us. 2. It's also smart enough to detect that `Kernel.Float("a")` isn't a Numeric and will raise an error. We don't need the `is_decimal?` check thanks to that. Passing `Float::DIG` as second argument to `BigDecimal` is mandatory because the precision can't be omitted when passing a Float. `Float::DIG` is what is used internally by ruby when calling `123.to_d` https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/lib/bigdecimal/util.rb#L47 - Another small issue introduced in https://github.com/rails/rails/pull/34693 would now raise a TypeError because `Regexp#===` will just return false if the passed argument isn't a string or symbol, whereas `Regexp#match?` will.
* | | | | | Merge pull request #35017 from yahonda/mysql8014Ryuta Kamizono2019-01-231-1/+2
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | MySQL 8.0.14 adds `ER_FK_INCOMPATIBLE_COLUMNS`
| * | | | | MySQL 8.0.14 adds `ER_FK_INCOMPATIBLE_COLUMNS`Yasuo Honda2019-01-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-14.html > Error messages relating to creating and dropping foreign keys > were improved to be more specific and informative. (Bug #28526309, Bug #92087) https://dev.mysql.com/doc/refman/8.0/en/server-error-reference.html > Error number: 3780; Symbol: ER_FK_INCOMPATIBLE_COLUMNS; SQLSTATE: HY000 > Message: Referencing column '%s' and referenced column '%s' in foreign key constraint '%s' are incompatible. > ER_FK_INCOMPATIBLE_COLUMNS was added in 8.0.14.
* | | | | | Merge pull request #35020 from alkesh26/ationpack-typo-fixesRafael França2019-01-223-6/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | Actionpack typo fixes.
| * | | | | | 1. Replaced unused variables by `_`.alkesh262019-01-223-6/+6
| | |_|/ / / | |/| | | | | | | | | | | | | | | | 2. Typo fixes.
* | | | | | Merge pull request #34952 from rails/template-stuffAaron Patterson2019-01-2211-82/+43
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Template Handler Refactoring
| * | | | | Ask the view for its method containerAaron Patterson2019-01-182-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than doing is_a? checks, ask the view object for its compiled method container. This gives us the power to replace the method container depending on the instance of the view.
| * | | | | Directly include "CompiledTemplates" moduleAaron Patterson2019-01-182-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We always want to include this module. It'll be used in production (maybe)
| * | | | | Only cache the view_context_class in one placeAaron Patterson2019-01-182-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the instance writer of view_context_class. Subclasses may override it, but it doesn't need to be written. This also eliminates the need to cache the return value of the class level `view_context_class` method.
| * | | | | Remove args from `default_render`Aaron Patterson2019-01-172-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | It's always called with 0 params, so just remove the parameter
| * | | | | Templates should be eval'd in the context of an AV::Base objectAaron Patterson2019-01-171-55/+0
| | | | | |
| * | | | | Pull up virtual path assignmentAaron Patterson2019-01-162-5/+3
| | | | | |
| * | | | | Pull buffer assignment upAaron Patterson2019-01-162-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since everything goes through a `run` method, we can pull the buffer assignment up.
| * | | | | Always evaluate views against an ActionView::BaseAaron Patterson2019-01-165-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Methods created by views should always be evaluated against an AV::Base instance. This way we can extract and refactor things in to classes.
| * | | | | Pull output buffer conditional upAaron Patterson2019-01-162-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This pulls the "output buffer existence" conditional up. Instead of evaling the same conditional over and over, we can pull it in to "only compiled once" Ruby code.
* | | | | | Merge pull request #34997 from alkesh26/typo-fix-webserverEileen M. Uchitelle2019-01-227-9/+9
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Replaced webserver with web server
| * | | | | Changed webserver to web server.alkesh262019-01-227-9/+9
| | | | | |
* | | | | | Merge pull request #35006 from kddeisz/alias-case-nodesRyuta Kamizono2019-01-222-0/+12
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Alias case nodes
| * | | | | Alias case nodesKevin Deisz2019-01-212-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | When `Arel` was merged into `ActiveRecord` we lost the ability to alias case nodes. This adds it back.
* | | | | | Merge pull request #34990 from rails/fix-time-multiparameter-castingAndrew White2019-01-214-1/+52
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Fix year value when casting a multiparameter time hash
| * | | | | Fix year value when casting a multiparameter time hashAndrew White2019-01-214-1/+52
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When assigning a hash to a time attribute that's missing a year component (e.g. a `time_select` with `:ignore_date` set to `true`) then the year defaults to 1970 instead of the expected 2000. This results in the attribute changing as a result of the save. Before: event = Event.new(start_time: { 4 => 20, 5 => 30 }) event.start_time # => 1970-01-01 20:30:00 UTC event.save event.reload event.start_time # => 2000-01-01 20:30:00 UTC After: event = Event.new(start_time: { 4 => 20, 5 => 30 }) event.start_time # => 2000-01-01 20:30:00 UTC event.save event.reload event.start_time # => 2000-01-01 20:30:00 UTC
* | | | | Merge pull request #35005 from bogdanvlviv/add-chanel-tests-to-rails-statsRyuta Kamizono2019-01-212-1/+2
|\ \ \ \ \ | | | | | | | | | | | | Add Channel tests to `rails stats`
| * | | | | Add Channel tests to `rails stats`bogdanvlviv2019-01-212-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails generates `test/channels`(#34933) and even allows `rails test:channels` (#34947). `rails stats` has been providing info about `app/channels`, it makes sense to add `test/channels` as well. (I've changed test because we generate `test/channels` with some code)
* | | | | | Merge pull request #35004 from ↵Ryuta Kamizono2019-01-211-0/+8
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | bogdanvlviv/add-missing-entries-to-guides-changelog-file Add missing entries to guides' changelog file [ci skip]
| * | | | | Add missing entries to guides' changelog file [ci skip]bogdanvlviv2019-01-211-0/+8
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We added "Action Mailbox Basics", "Action Text Overview" guides(#34812, #34878) I think it makes to mention about it in the changelog file. (Similar to 7200ec92f8) Note that entries retain original author since I just moved content from readme files to the guides.
* | | | | Merge pull request #34982 from takeyuweb/fix_activestorage_allow_other_hostGeorge Claghorn2019-01-214-2/+57
|\ \ \ \ \ | | | | | | | | | | | | Fix ArgumentError when using S3Service
| * | | | | Fix ArgumentError: Unsafe redirectYuichi Takeuchi2019-01-214-2/+57
| | |_|/ / | |/| | |
* | | | | Merge pull request #34991 from mcgregordan/mailbox-statisticsRyuta Kamizono2019-01-201-0/+2
|\ \ \ \ \ | |_|/ / / |/| | | | Report statistics for app/mailboxes
| * | | | Report statistics from ActionMailboxDan McGregor2019-01-201-0/+2
|/ / / /
* | | | Merge pull request #34988 from bogdanvlviv/fix-development_dependencies_installRyuta Kamizono2019-01-201-1/+0
|\ \ \ \ | | | | | | | | | | Update "Development Dependencies Install" guide [ci skip]
| * | | | Fix "Development Dependencies Install" guide [ci skip]bogdanvlviv2019-01-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Since we use [workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) `yarn install` from the root should install all the javascript dependencies.
* | | | | Fix type casting column default in `change_column`Ryuta Kamizono2019-01-204-28/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #31230, `change_column` is executed as a bulk statement. That caused incorrect type casting column default by looking up the before changed type, not the after changed type. In a bulk statement, we can't use `change_column_default_for_alter` if the statement changes the column type. This fixes the type casting to use the constructed target sql_type. Fixes #34938.