aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* date_select helper with_css_classes option also accept a hashneumayr2016-04-053-3/+439
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `date_select` helper `:with_css_classes` option now accepts a hash of strings for `:year`, `:month`, `:day`, `:hour`, `:minute`, `:second` that will extend the select type with the given css class value. ```erb <%= f.date_select :birthday, with_css_classes: { month: "my-month", year: "my-year" } %> ``` ```html <select id="user_birthday_3i" name="user[birthday(3i)]">…</select> <select id="user_birthday_2i" name="user[birthday(2i)]" class="my-month">…</select> <select id="user_birthday_1i" name="user[birthday(1i)]" class="my-year">…</select> ``` Optional, add global `html_options` to modify every select tag in the set. ```erb <%= f.date_select :birthday, with_css_classes: { month: "my-month", year: "my-year" }, { class: "my-date optional" } %> ``` Supported DateHelper methods: `select_day`, `select_month`, `select_year`, `select_hour`, `select_minute`, `select_second`, `select_datetime`, `select_time`, `time_select`, `date_select` and `datetime_select`. `:with_css_classes` option was added to the `date_select` with #7975.
* Merge pull request #24410 from mechanicles/strong-weak-etags-infoप्रथमेश Sonpatki2016-04-051-3/+29
|\ | | | | Update documentation based on the new changes for strong & weak ETags.
| * Update documentation based on the new changes for strong & weak ETags [ci skip]Santosh Wadghule2016-04-051-3/+29
| | | | | | | | | | | | | | - Update info for weak ETag - Add info for strong ETag - Add examples for strong and weak ETags - Display difference between generated strong and weak ETags strings.
* | Merge pull request #24119 from prathamesh-sonpatki/proc-messagesRafael França2016-04-053-1/+15
|\ \ | | | | | | Allow passing record being validated to error message generator
| * | Allow passing record being validated to error message generatorPrathamesh Sonpatki2016-04-053-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Pass object to I18n helper so that when calling message proc, it will pass that object as argument to the proc and we can generate custom error messages based on current record being validated. - Based on https://github.com/rails/rails/issues/856. [Łukasz Bandzarewicz, Prathamesh Sonpatki]
* | | Merge pull request #24429 from vipulnsward/24401-docsRafael França2016-04-051-1/+1
|\ \ \ | |/ / |/| | Guides changes, follow up of #24401 [ci skip]
| * | Guides changes, follow up of #24401Vipul A M2016-04-051-1/+1
|/ / | | | | | | [ci skip]
* | Merge pull request #24345 from ↵Rafael França2016-04-052-4/+19
|\ \ | | | | | | | | | | | | mtsmfm/fix-marshal-with-autoloading-for-nested-class Fix marshal with autoloading for nested class/module
| * | Fix marshal with autoloading for nested class/moduleFumiaki MATSUSHIMA2016-03-282-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | #24150 break autoloading for nested class/module. There is test for nested class but it doesn't work correctly. Following code will autoload `ClassFolder::ClassFolderSubclass` before `Marshal.load`: `assert_kind_of ClassFolder::ClassFolderSubclass, Marshal.load(dumped)`
* | | Merge pull request #24401 from pan/number-to-phoneRafael Mendonça França2016-04-055-4/+36
|\ \ \ | | | | | | | | | | | | `number_to_phone` formats number with regexp
| * | | `number_to_phone` formats number with regexpPan GaoYong2016-04-025-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, this method formats US number. This commit extends its functionality to format number for other countries with a custom regular expression. number_to_phone(18812345678, pattern: /(\d{3})(\d{4})(\d{4})/) # => 188-1234-5678 The output phone number is divided into three groups, so the regexp should also match three groups of numbers.
* | | | Merge pull request #24426 from yui-knk/refactor_mysql2Rafael França2016-04-042-6/+16
|\ \ \ \ | | | | | | | | | | Use `QUOTED_TRUE` and `QUOTED_FALSE` instead of magic strings
| * | | | Use `QUOTED_TRUE` and `QUOTED_FALSE` instead of magic stringsyui-knk2016-04-052-6/+16
|/ / / / | | | | | | | | | | | | | | | | | | | | Because we define `QUOTED_TRUE` as `"1"` and `QUOTED_FALSE` as `"0"`. And add test cases to ensure this commit does not break current behavior even if the value of `attributes_before_type_cast` is false.
* | | | Merge pull request #24421 from arthur-vieira/patch-1Rafael França2016-04-041-2/+2
|\ \ \ \ | | | | | | | | | | [ci skip] Fix variable name
| * | | | [ci skip] Fix variable nameArthur Vieira2016-04-041-2/+2
|/ / / /
* | | | Merge pull request #24304 from rthbound/24239-workAndrew White2016-04-043-1/+31
|\ \ \ \ | | | | | | | | | | Fixes #24239
| * | | | Fixes #24239Ryan T. Hosford2016-04-043-1/+31
| | |_|/ | |/| | | | | | | | | | | | | | - skip calling helper_method if it's not there: if we don't have helpers, we needn't define one. - tests that an api controller can include and use ActionController::Cookies
* | | | Merge pull request #24332 from blackchestnut/doc/deprecation_warnSantiago Pastorino2016-04-041-2/+2
|\ \ \ \ | |/ / / |/| | | Added 'config.' to deprecation warning
| * | | Added 'config.' to deprecation warningAlexander Kalinichev2016-03-261-2/+2
| | | | | | | | | | | | | | | | Misc: `config.public_file_server.enabled = true` instead `public_file_server.enabled = true`
* | | | Merge pull request #24247 from ypxing/refactor_substitute_valuesAndrew White2016-04-041-5/+5
|\ \ \ \ | | | | | | | | | | enhance ActiveRecord#substitute_values to loop values just once
| * | | | enhance ActiveRecord#substitute_values to loop values just onceRick Xing2016-03-191-5/+5
| | | | |
* | | | | Match `String#to_time`'s behaviour to rubySiim Liiser2016-04-043-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously `String#to_time` returned the midnight of the current date in some cases where there was no relavant information in the string. Now the method returns `nil` instead in those cases. Fixes #22958.
* | | | | Call super instead of returning nil for DateTime#<=>Andrew White2016-04-033-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The native DateTime#<=> implementation can be used to compare instances with numeric values being considered as astronomical julian day numbers so we should call that instead of returning nil. Fixes #24228.
* | | | | Use block form of Dir.mktmpdir to ensure tidy upAndrew White2016-04-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the test run was interrupted in some way then it left temporary directories inside of test causing the git worktree to be in a dirty state. By overriding the run method we can use the block form of Dir.mktmpdir to ensure that the directories are cleaned up no matter which way the test run is exited.
* | | | | Prevent void context warningsAndrew White2016-04-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The constant reference A::B used to trigger autoloading causes a warning to be logged about the possible use of :: in a void context so assign it to the _ variable to prevent the warnings from being triggered.
* | | | | Merge pull request #24406 from prathamesh-sonpatki/update-release-notesKasper Timm Hansen2016-04-031-10/+0
|\ \ \ \ \ | | | | | | | | | | | | Update Rails 5.0 release notes
| * | | | | Update Rails 5 release notes [ci skip]Prathamesh Sonpatki2016-04-031-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed entry for # Template Collection from release notes. - Remove duplicate entry for caching Action mailer views. - Remove duplicate entry for left_outer_joins.
* | | | | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2016-04-035-4/+11
|\ \ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | s/documention/documentation/Vipul A M2016-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
| * | | | | [ci skip] Fix example of ActionController::Parameters#to_unsafe_hPrathamesh Sonpatki2016-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Added missing `"`.
| * | | | | s/responsibilty/responsibility/Vipul A M2016-03-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | s/symantically/semantically/ [ci skip]
| * | | | | format as code [ci-skip]Gaurish Sharma2016-03-141-1/+1
| | | | | |
| * | | | | Add example for ActionController::Parameters#to_unsafe_hGaurish Sharma2016-03-121-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | [ci-skip]
* | | | | | Merge pull request #24403 from vipulnsward/etag-doc-passJeremy Daer2016-04-021-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Grammar fixes based on pass over ETag doc changes
| * | | | | | Grammar fixes based on pass over ETag doc changesVipul A M2016-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | Merge pull request #24404 from y-yagi/remove_deprecated_methodArthur Nogueira Neves2016-04-021-2/+0
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | remove deprecated `datetime_field` from guide [ci skip]
| * | | | | | remove deprecated `datetime_field` from guide [ci skip]yuuji.yaginuma2016-04-031-2/+0
|/ / / / / / | | | | | | | | | | | | | | | | | | `datetime_field` was deprecated in 316811b4d3f4e5a1a7bcd03de97c67218770e333
* | | | | | Merge pull request #24398 from yui-knk/remove_not_need_includeArthur Nogueira Neves2016-04-022-7/+0
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | Remove not needed including
| * | | | | Remove not needed includingyui-knk2016-04-022-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because `DateTime` inherits `Date` and `Date` includes `DateAndTime::Zones`, `DateTime` not need to include `DateAndTime::Zones` again.
* | | | | | Merge pull request #24400 from utilum/Grammer_fix_in_commentVipul A M2016-04-021-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Grammer fix in comment: capitalize first word in sentence [ci skip].
| * | | | | Grammer fix in comment: capitalize first word in sentence [ci skip].utilum2016-04-021-1/+1
|/ / / / /
* | | | | Merge pull request #24387 from jeremy/strong-etagJeremy Daer2016-04-016-63/+210
|\ \ \ \ \ | | | | | | | | | | | | Strong ETag validators
| * | | | | Strong ETag validatorsJeremy Daer2016-03-316-63/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Introduce `Response#strong_etag=` and `#weak_etag=` and analogous options for `fresh_when` and `stale?`. `Response#etag=` sets a weak ETag. Strong ETags are desirable when you're serving byte-for-byte identical responses that support Range requests, like PDFs or videos (typically done by reproxying the response from a backend storage service). Also desirable when fronted by some CDNs that support strong ETags only, like Akamai. * No longer strips quotes (`"`) from ETag values before comparing them. Quotes are significant, part of the ETag. A quoted ETag and an unquoted one are not the same entity. * Support `If-None-Match: *`. Rarely useful for GET requests; meant to provide some optimistic concurrency control for PUT requests.
* | | | | | Merge pull request #24388 from javiervidal/20160331Arun Agrawal2016-04-011-1/+1
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Fixes broken link in 'Ruby on Rails 2.2 Release Notes'
| * | | | | Fixes broken link in 'Ruby on Rails 2.2 Release Notes' [ci skip]Javier Vidal2016-04-011-1/+1
|/ / / / /
* | | | | Merge pull request #24379 from Gaurav2728/sanitizer-helper-update-docKasper Timm Hansen2016-03-311-1/+1
|\ \ \ \ \ | | | | | | | | | | | | sanitiser helper may be remove in 5.1, update doc [ci skip]
| * | | | | sanitiser helper may be remove in 5.1, update doc [ci skip]Gaurav Sharma2016-03-311-1/+1
| | | | | | | | | | | | | | | | | | using `rails-html-sanitizer` gem still Rails providing strip_tags, strip_links features. May be remove in 5.1
* | | | | | Revert "Deprecate table names containing dots"Sean Griffin2016-03-312-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7b82e1c77b48cb351da4e0ed6ea0bac806d4925c. This would have removed the ability to reference a schema when using PG
* | | | | | Merge pull request #24377 from bogdanvlviv/fix_upcase_firstRafael França2016-03-314-4/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix method String#upcase_first
| * | | | | | Fix method String#upcase_firstbogdanvlviv2016-03-314-4/+16
| |/ / / / /