aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/tags/base.rb
Commit message (Collapse)AuthorAgeFilesLines
* Raise an ArgumentError when `include_blank` is false for a required field inGrey Baker2015-06-081-3/+9
| | | | | | | | | | `Tags::Base#select_content_tag`. Previously, passing a falsey value to `include_blank` would be ignored if the field was required, and a blank line would still be inserted. The following will now raise instead of quietly failing: `select("post", "category", %w(a required field), { include_blank: false }, required: 'required')`
* Remove code duplication in ActionView::Helpers::Tags::BaseBogdan Gusiev2015-02-111-25/+24
|
* Only use the `_before_type_cast` in the form when from user inputSean Griffin2015-01-141-2/+9
| | | | | | While we don't want to change the form input when validations fail, blindly using `_before_type_cast` will cause the input to display the wrong data for any type which does additional work on database values.
* Revert "Don't use the `_before_type_cast` version of attributes in the form"Sean Griffin2015-01-141-0/+10
| | | | This reverts commit 787e22bb491bd8c36db1e9734261c4ce02c5c5fd.
* Don't use the `_before_type_cast` version of attributes in the formSean Griffin2015-01-141-10/+0
| | | | | | | | | | | We should never be ignoring valuable information that the types may need to give us. The reason that it originally used `_before_type_cast` is unclear, but appears to date back long enough that the reasons may not be relevant today. There is only one test that asserts that it uses the before type cast version, but it gives no context as to why and uses a mock which does not simulate the real world. Fixes #18523.
* Honor public/private in ActionView::Helpers::Tags::Base#valueTobias Pfeiffer2014-10-311-1/+1
| | | | | * use public_send instead of send to avoid calling private methods in form helpers
* Fix some edge cases for AV `select` helper with `:selected` optionBogdan Gusiev2013-09-231-1/+2
|
* Move actionpack/lib/action_view* into actionview/libPiotr Sarnacki2013-06-201-0/+147