Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix doc [ci skip] | Daniel Gomez de Souza | 2016-01-27 | 1 | -1/+1 |
| | |||||
* | Fix collection_radio_buttons' hidden_field name and make it appear before ↵ | Santiago Pastorino | 2015-12-31 | 2 | -2/+10 |
| | | | | | | the radios Fixes #22773 | ||||
* | Fix week_field returning invalid value | Christoph | 2015-11-10 | 1 | -1/+1 |
| | | | | | | | According to the W3 spec[1] the value should use a 1-based index and not a 0-based index for the week number. [1]: http://www.w3.org/TR/html-markup/datatypes.html#form.data.week | ||||
* | Collection check boxes propagates input's id to the label's for attribute. | Vasiliy Ermolovich | 2015-10-20 | 1 | -0/+2 |
| | |||||
* | Add a hidden field on the collection_radio_buttons | Mauro George | 2015-09-24 | 3 | -32/+29 |
| | | | | | This will avoid a error be raised when the only input on the form is the `collection_radio_buttons`. | ||||
* | Raise an ArgumentError when `include_blank` is false for a required field in | Grey Baker | 2015-06-08 | 1 | -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')` | ||||
* | Merge pull request #18845 from bogdan/remove-code-dups-in-action-view | Rafael Mendonça França | 2015-02-11 | 2 | -33/+25 |
|\ | | | | | Remove some code duplication in ActionView tags code | ||||
| * | Remove code duplication in ActionView::Helpers::Tags::Base | Bogdan Gusiev | 2015-02-11 | 2 | -33/+25 |
| | | |||||
* | | Remove warning from ActionView::Helpers::Tags::Translator | Yuki Nishijima | 2015-02-08 | 1 | -1/+3 |
|/ | | | | | | This removes the following warning: /GitHub/rails/actionview/lib/action_view/helpers/tags/translator.rb:19: warning: private attribute? | ||||
* | Fixed undefined method `i18n_key' for nil:NilClass for labels in non AR form_for | Miklos Fazekas | 2015-02-06 | 1 | -1/+1 |
| | | | | | Refactoring at #18647 broke using non active record objects in form_for. This patch restores the original behaviour where we only compute i18 key when object.respond_to?(:to_model) | ||||
* | Rename method to make explicit its intention | Rafael Mendonça França | 2015-02-05 | 3 | -3/+3 |
| | | | | call is too generic | ||||
* | Use kwags to make the argument meaning explicit | Rafael Mendonça França | 2015-02-05 | 3 | -6/+6 |
| | |||||
* | Use new hash syntax | Rafael Mendonça França | 2015-02-05 | 1 | -1/+1 |
| | |||||
* | Change the method visibility | Rafael Mendonça França | 2015-02-05 | 1 | -2/+4 |
| | | | | Thse methods are used only inside this class | ||||
* | Only check if object respond_to to_model once | Rafael Mendonça França | 2015-02-05 | 1 | -6/+2 |
| | |||||
* | placeholder doesn't exist inside this context | Rafael Mendonça França | 2015-02-05 | 1 | -2/+2 |
| | |||||
* | Reduce duplication when generating translations | Maarten Claes | 2015-01-22 | 3 | -34/+46 |
| | |||||
* | Convert with `to_model` before calling ActiveModel methods on `object` | Maarten Claes | 2015-01-22 | 2 | -8/+14 |
| | |||||
* | Only use the `_before_type_cast` in the form when from user input | Sean Griffin | 2015-01-14 | 1 | -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 Griffin | 2015-01-14 | 3 | -2/+12 |
| | | | | This reverts commit 787e22bb491bd8c36db1e9734261c4ce02c5c5fd. | ||||
* | Don't use the `_before_type_cast` version of attributes in the form | Sean Griffin | 2015-01-14 | 3 | -12/+2 |
| | | | | | | | | | | | 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. | ||||
* | Merge pull request #17973 from maurogeorge/file_field_hidden_field | Rafael Mendonça França | 2015-01-02 | 1 | -0/+15 |
|\ | | | | | | | Generate a hidden_tag when using a file_field | ||||
| * | Add a hidden_field on the file_field | Mauro George | 2015-01-02 | 1 | -0/+13 |
|/ | | | | | This will avoid a error be raised when the only input on the form is the `file_field`. | ||||
* | Remove block from super | Jose Añasco | 2014-12-23 | 2 | -10/+12 |
| | |||||
* | Fix options overwritten by super | Jose Añasco | 2014-12-09 | 2 | -11/+10 |
| | |||||
* | Honor public/private in ActionView::Helpers::Tags::Base#value | Tobias Pfeiffer | 2014-10-31 | 1 | -1/+1 |
| | | | | | * use public_send instead of send to avoid calling private methods in form helpers | ||||
* | Merge pull request #16488 from agrobbin/form-label-builder | Jeremy Kemper | 2014-08-25 | 1 | -22/+46 |
|\ | | | | | Provide a builder for form labels to customize wrapping around I18n content | ||||
| * | provide a builder for form labels to customize wrapping around I18n content | Alex Robbin | 2014-08-20 | 1 | -22/+46 |
| | | |||||
* | | just use the placeholder tag value if it is passed as a String | Alex Robbin | 2014-08-22 | 1 | -1/+3 |
| | | |||||
* | | add I18n support for `:placeholder` HTML option is passed to form fields | Alex Robbin | 2014-08-22 | 3 | -0/+40 |
| | | |||||
* | | Revert "Add I18n support for `:placeholder` HTML option is passed to form ↵ | Jeremy Kemper | 2014-08-21 | 3 | -40/+0 |
|/ | | | | fields" | ||||
* | Merge pull request #15889 from carnesmedia/model-name | Rafael Mendonça França | 2014-08-17 | 1 | -1/+1 |
|\ | | | | | | | Use #model_name on instances instead of classes | ||||
| * | Use #model_name on instances instead of classes | Amiel Martin | 2014-06-24 | 1 | -1/+1 |
| | | | | | | | | | | | | This allows rails code to be more confdent when asking for a model name, instead of having to ask for the class. Rails core discussion here: https://groups.google.com/forum/#!topic/rubyonrails-core/ThSaXw9y1F8 | ||||
* | | add I18n support for `:placeholder` HTML option is passed to form fields | Alex Robbin | 2014-08-12 | 3 | -0/+40 |
| | | |||||
* | | Fixed #select form builder helper to support block with html output | Bogdan Gusiev | 2014-08-05 | 1 | -1/+1 |
| | | |||||
* | | Use if/else | Rafael Mendonça França | 2014-06-30 | 1 | -2/+5 |
| | | | | | | | | | | Since we are using both branches of the code is preferable to use if/else over the early return. | ||||
* | | Add String support for min/max attributes on DatetimeField | Todd Bealmear | 2014-06-30 | 1 | -2/+7 |
|/ | |||||
* | In actionview, eliminate calls to tag that use html_safe parameter values. ↵ | Paul Grayson | 2014-06-13 | 1 | -1/+0 |
| | | | | This is generally unnecessary, since tag handles string quoting, except in one case (utf8_enforcer_tag) where we want to specify the encoding ourselves. | ||||
* | Include label value in i18n attribute lookup | Joshua Cody | 2014-05-06 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | | Previously, only the object and method name from the label tag were used when looking up the translation for a label. If a value is given for the label, this ought to be additionally used. The following: # form.html.erb <%= form_for @post do |f| %> <%= f.label :type, value: "long" %> <% end %> # en.yml en: activerecord: attributes: post/long: "Long-form Post" Used to simply return "long", but now it will return "Long-form Post". | ||||
* | `collection_check_boxes` respects `:index` option for the hidden filed name. | Vasiliy Ermolovich | 2014-04-14 | 1 | -4/+13 |
| | | | | closes #14147 | ||||
* | CollectionHelpers now accepts a readonly option | Mauro George | 2014-04-12 | 1 | -1/+1 |
| | |||||
* | Merge pull request #12662 from nashby/include-hidden-collection | Rafael Mendonça França | 2014-03-15 | 1 | -3/+7 |
|\ | | | | | | | | | | | | | | | add include_hidden option to collection_check_boxes helper Conflicts: actionview/CHANGELOG.md actionview/test/template/form_collections_helper_test.rb | ||||
| * | add include_hidden option to collection_check_boxes helper | Vasiliy Ermolovich | 2013-10-27 | 1 | -3/+7 |
| | | |||||
* | | Fix ActionView label translation for more than 10 nested elements | Vladimir Krylov | 2014-02-24 | 1 | -1/+1 |
| | | |||||
* | | Label only accepts `:index` and `:namespace` attributes from the input | Andriel Nuernberg | 2013-12-05 | 2 | -2/+1 |
|/ | |||||
* | Use the given name in html_options for the hidden field in ↵ | Angel N. Sciortino | 2013-09-24 | 1 | -1/+2 |
| | | | | collection_check_boxes | ||||
* | Fix some edge cases for AV `select` helper with `:selected` option | Bogdan Gusiev | 2013-09-23 | 1 | -1/+2 |
| | |||||
* | Ability to pass block to AV#select helper | Bogdan Gusiev | 2013-09-23 | 1 | -1/+2 |
| | | | | | | | | Example: = select(report, "campaign_ids") do - available_campaigns.each do |c| %option{:data => {:tags => c.tags.to_json}, :value => c.id}= c.name | ||||
* | handle `:namespace` form option in collection labels | Vasiliy Ermolovich | 2013-09-22 | 2 | -1/+3 |
| | |||||
* | text_area should handle nil value option like text_field | Joel Cogen | 2013-07-24 | 2 | -3/+3 |
| |