aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/tags/base.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #29791 from yui-knk/at_objectRyuta Kamizono2017-09-051-6/+6
|\ | | | | Do not pass an instance variable to a private method
| * Do not pass an instance variable to a private methodyui-knk2017-09-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | `ActionView::Helpers::Tags::Base` has `@object` and all passed arguments for * `#value` * `#value_before_type_cast` * `#value_came_from_user?` are `@object`, so we do not need to pass arguments in this case.
* | Allow non-English values for collection_radio_buttons/check_boxescolorfulfool2017-08-021-1/+1
| |
* | Use frozen string literal in actionview/Kir Shatrov2017-07-241-0/+2
|/
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Move slicing to initializer.Kasper Timm Hansen2017-06-071-1/+1
| | | | | | Forgot all about https://github.com/rails/rails/pull/28844/files#r113780934 cc @rafaelfranca
* Remove unnecessary `skip_default_ids` and ↵kyuden2017-04-241-1/+1
| | | | `allow_method_names_outside_object` attributes of select tag in `form_with`
* Generate indexed names in input even when objects are not persistedRafael Mendonça França2017-01-031-2/+13
| | | | | | | | | | | | | | When you ask to generate multiple nested inputs using: field_for('comments[]', Comment.new) do |c| c.text_field :body Rails should generated the names like `post[comments][][body]`. To make sure we don't have regression the fake models now use the same implementation of `#to_param` as `ActiveRecord::Base` Fixes #26942
* form_with: allow methods outside the model.Kasper Timm Hansen2016-12-181-3/+14
| | | | | | | | Has the handy effect of making the initial examples in the form_with docs work too. Had to do some finagling such that form_with's without a scope didn't wrap their names in braces ala `[title]`.
* form_with/fields: Don't output ids by defaultKasper Timm Hansen2016-12-131-3/+11
| | | | | | | | | | | Continuing 67f81cc where we decided not to output ids by default in the new form helpers. Went with @dhh's suggestion of just requiring ids on fields being labelled: https://github.com/rails/rails/issues/25197#issuecomment-231797117 Seems okay enough.
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-3/+3
|
* Add three new rubocop rulesRafael Mendonça França2016-08-161-2/+2
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-99/+99
|
* modernizes hash syntax in actionviewXavier Noria2016-08-061-3/+3
|
* applies new string literal convention in actionview/libXavier Noria2016-08-061-3/+3
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* New syntax for tag helpers i.e. tag.br instead of tag(br) #25195Marek2016-06-271-2/+2
|
* 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