aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/tags
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-04-1133-68/+67
|\ | | | | | | | | Conflicts: guides/source/action_mailer_basics.md
| * mark ActionView::Helpers::Tags as :nodoc: [ci skip]Francesco Rodriguez2013-04-0433-68/+67
| |
* | Fix explicit names on multiple file fieldsRyan McGeary2013-04-051-8/+7
|/ | | | | | | | If a file field tag is passed the multiple option, it is turned into an array field (appending "[]"), but if the file field is passed an explicit name as an option, leave the name alone (do not append "[]"). Fixes #9830
* Fix incorrectly appended square brackets to a multiple select boxOlek Janiszewski2013-03-081-1/+1
| | | | | | | | | | | | | | If an explicit name has been given and it already ends with "[]" Before: select(:category, [], {}, multiple: true, name: "post[category][]") # => <select name="post[category][][]" ...> After: select(:category, [], {}, multiple: true, name: "post[category][]") # => <select name="post[category][]" ...>
* Capture block so content won't leak.José Mota2013-01-212-4/+4
| | | | | | | | | | | | | | The [following pull request](https://github.com/rails/rails/pull/8916) fixed the block being passed to the appropriate helper method. However, the content being passed into the block is generating repeated markup on the page due to some weird ERb evaluation. This commit tries to capture the block's generated output so the page isn't flooded with markup. [Rafael França + José Mota] Closes #8936
* Fix date_select :selected option so you can pass it nilColin Burn-Murdoch2013-01-161-1/+1
|
* Rename :value option to :selected, in line with other select helpersColin Burn-Murdoch2013-01-141-1/+1
| | | | | Add tests for time & datetime. Add documentation.
* Allow value to be set on date_selectColin Burn-Murdoch2013-01-131-1/+1
|
* Extract the component rendering of collection_radio_buttons andRafael Mendonça França2012-12-262-2/+14
| | | | | | | | | | | | | | | | | | | | | | collection_check_boxes to a private method. It will make easier to extend. Example: class CollectionRadioButtons < ActionView::Helpers::Tags::CollectionRadioButtons include CollectionExtensions def render wrap_rendered_collection(super, @options) end private def render_component(builder) builder.radio_button + builder.label(:class => "collection_radio_buttons") end end
* Fix collection_radio_buttons with the option `:checked` with value ofRafael Mendonça França2012-12-261-1/+2
| | | | `false`
* Add missing require.Rafael Mendonça França2012-12-131-0/+2
| | | | | I was trying to use those files without Rails and that require was missing.
* Remove deprecation message from Action PackCarlos Antonio da Silva2012-12-111-1/+1
| | | | | Related to the deprecation of Time.utc_time in favor of Time.utc, in 48583f8bf74d1cefefea3cd6591bd546a9eaff6c.
* Support :multiple option on input tags with :indexDaniel Fox, Grant Hutchins & Trace Wax2012-11-022-6/+4
| | | | | When you have an explicit index set, then when you build an input tag with :multiple => true, it doesn't add [] to the end of its name, although it should.
* check_box value can be not only an object of Array classVasiliy Ermolovich2012-10-201-3/+5
| | | | there is a chance that `value` is a Set or an object that reponses to `include?` method so let's handle this case
* Fixed bug creating invalid HTML in select optionsRusty Geldmacher2012-07-101-2/+2
| | | | | | When a select tag is created for a field with errors, then the inserted options will errantly have a <div class="field_with_errors"> wrapping them.
* Refactor date related helpersCarlos Galdino2012-05-226-50/+26
|
* Add several HTML5 input helpersCarlos Galdino2012-05-214-0/+89
| | | | | | | | | | | | The input types added are: - input[type="month"] - input[type="week"] - input[type="datetime"] - input[type="datetime-local"]
* Add HTML5 input[type="color"] helperCarlos Galdino2012-05-211-0/+25
|
* Add HTML5 input[type="time"] helperAlex Soulim2012-05-181-0/+14
|
* Don't need to force size to nilRafael Mendonça França2012-05-164-10/+0
|
* Make :prompt work as documentedRafael Mendonça França2012-05-161-2/+1
|
* Do not add `:include_blank` option if prompt is presentRafael Mendonça França2012-05-131-3/+3
|
* Only set `:include_blank` if the value of this options is not presentRafael Mendonça França2012-05-131-1/+1
|
* `:include_blank` should be true if the size option is nilRafael Mendonça França2012-05-131-2/+2
|
* Always include the options :include_blank if the select has a required attributeangelo giovanni capilleri2012-05-131-0/+5
| | | | and display size 1 and not multiple attribute, Fixes #5908
* check checkboxes with array of strings as :checked optionVasiliy Ermolovich2012-05-051-1/+1
|
* Change check_box to work inverting the checked and unchecked valueRafael Mendonça França2012-04-291-4/+2
| | | | | | | | | | This fixes: * Boolean with inverted logic * Integer with inverted logic * BigDecimal with inverted logic Fixes #3995
* pass default value as argument to fetchSergey Nartimov2012-04-061-1/+1
|
* Small #label method refactoring, thanks @rafaelfrancaAlexey Vakhov2012-04-011-3/+2
|
* Block version of label should wrapped in field_with_errors in case of errorAlexey Vakhov2012-04-011-1/+2
|
* Merge pull request #5621 from rafaelfranca/fix-2492-masterJeremy Kemper2012-03-271-3/+3
|\ | | | | Fix label_tag to merge the options hash with the object hash
| * Check if the options hash already exists and merge it with the anotherRafael Mendonça França2012-03-271-3/+3
| | | | | | | | | | | | hash. Closes #2492 and #5615
* | Don't break Haml with textarea newline fix.James Coleman2012-03-271-1/+1
|/ | | | | | See issue #393, issue #4000, issue #5190, and issue #5191. Adds a newline after the textarea opening tag based on @codykrieger's original patch so that we don't cause regressions in Haml-using apps. The regression caused textarea tags to add newlines to the field unintentionally (each update/save added an extra newline.) Also fix 6 more tests that didn't yet have the newline expectation.
* add include_hidden option to checkbox tagSergey Nartimov2012-03-131-2/+8
|
* add 'include_hidden' option to select tag, closes #5402Vasiliy Ermolovich2012-03-131-1/+2
|
* Fixes #5324 by removing default size options from input:text and default ↵Philip Arndt2012-03-103-7/+2
| | | | cols and rows options from textarea.
* Merge branch 'master-security'Aaron Patterson2012-03-011-3/+2
|\ | | | | | | | | | | | | | | | | | | | | | | * master-security: Ensure [] respects the status of the buffer. delete vulnerable AS::SafeBuffer#[] use AS::SafeBuffer#clone_empty for flushing the output_buffer add AS::SafeBuffer#clone_empty fix output safety issue with select options Conflicts: actionpack/lib/action_view/helpers/tags/base.rb
| * fix output safety issue with select optionsSergey Nartimov2012-02-201-3/+3
| |
* | Add a new line after the textarea opening tag.Rafael Mendonça França2012-02-271-1/+1
| | | | | | | | Closes #393
* | Fix collection_check_boxes and collection_radio_buttons when using localRafael Mendonça França2012-02-261-0/+1
| | | | | | | | variables in the form builder
* | use content_tag instead stringsVasiliy Ermolovich2012-02-251-3/+4
| |
* | correct fetching :name option in form fieldsVasiliy Ermolovich2012-02-231-3/+3
|/
* add selected and disabled option to grouped selectVasiliy Ermolovich2012-02-181-1/+6
|
* Allow collection helpers with block to access current object in the collectionCarlos Antonio da Silva2012-02-133-9/+10
| | | | | | | | | | This gives a lot more flexibility to the user, for instance to generate a collection of check boxes and labels, allowing to add custom classes or data-* attributes to the label/check_box using another object attribute. This basically mimics options_for_select functionality that accepts a third option for each item to generate html attributes for each option.
* Add HTML5 input[type="date"] helperOlek Janiszewski2012-02-122-1/+16
|
* Remove default class to collection_check_boxes andRafael Mendonça França2012-02-022-2/+2
| | | | | | collection_radio_buttons [Carlos Antonio da Silva + Rafael Mendonça França]
* Allow collection radio_buttons/check_boxes to access current text/valueCarlos Antonio da Silva2012-02-021-0/+2
| | | | [Carlos Antonio da Silva + Rafael Mendonça França]
* Allow proc for value/text method in collection_selectCarlos Antonio da Silva2012-02-021-4/+0
| | | | | | And options_from_collection_for_select as well. [Carlos Antonio da Silva + Rafael Mendonça França]
* Move collection radio buttons / check boxes back to FormOptionsHelperCarlos Antonio da Silva2012-02-021-8/+6
| | | | [Carlos Antonio da Silva + Rafael Mendonça França]
* Extract common collection helpers to a module to avoid too much inheritanceCarlos Antonio da Silva2012-02-023-69/+93
| | | | [Carlos Antonio da Silva + Rafael Mendonça França]