Commit Graph

9 Commits

Author SHA1 Message Date
Ryuta Kamizono dc96825d44 Fix `number_to_human_size`'s result [ci skip] 2021-03-09 08:45:35 +09:00
Sebastien Auriault 24d1615789 Add missing ActionView helper number_to_human in guides 2021-02-11 22:02:30 -05:00
André Luis Leal Cardoso Junior 1280620767 Remove legacy media=screen default from stylesheet_link_tag.
If the media attribute is omitted, the default for web browsers is "all", meaning that by default links apply to all media.

Before:

```ruby
> stylesheet_link_tag "style"
=> <link href="/assets/style.css" media="screen" rel="stylesheet" />
```

After:

```ruby
> stylesheet_link_tag "style"
=> <link href="/assets/style.css" rel="stylesheet" />

```

The current behavior is not going to change for existing applications.

For newly built applications, the media attribute is not going to be added by default. Which can be configured using the following:

```
Rails.application.config.action_view.stylesheet_media_default = false
```
2021-01-22 20:42:22 -03:00
Alex Ghiculescu 76e432341c Always recommend config.asset_host in examples 2020-11-30 16:33:51 -06:00
Petrik ecc533ce6a Remove duplicate FormHelpers from ActionView Helpers guide [ci skip]
Since there's already a whole seperate guide dedicated to Formhelpers,
there is no need to duplicate them in the ActionView Helpers guide.
We can link to the FormHelpers guide instead.
2020-10-05 19:02:51 +02:00
Jonathan Hefner e6950a332a Add label attribute to <option> from include_blank
The `:include_blank` option of various `<select>`-related helpers causes
an `<option>` element with no content to be rendered.  However, the
[HTML spec] says that unless an `<option>` element has a `label`
attribute (which must be non-empty), its content must be "Text that is
not inter-element whitespace."

In #24923, this issue was addressed for `select_tag` by adding a `label`
attribute to the `<option>`.  This commit addresses the issue in the
same manner for `FormBuilder#select` and various date / time select
helpers.

[HTML spec]: https://html.spec.whatwg.org/multipage/form-elements.html#the-option-element
2020-07-24 15:45:18 -05:00
Vipul A M 9caf09ef19
AV Helper guide fixes- (#39679)
- Fix spacing on output
- Fix short forms usage
[ci skip]
2020-06-20 21:23:43 +05:30
Vipul A M 89b2cb4d61
Fix display of outputs on AV Helpers guide in case of multi-line [ci skip] (#39675) 2020-06-20 03:54:12 +05:30
Petrik 9a4e328d3e Move Actionview Helpers guides to seperate guide [skip ci]
The ActionView Overview guide is currently a Work In Progress (WIP)
because, it seems, not all ActionView helpers are listed. As it's also
one of the largest guides, we can move the helpers to a seperate guide.
This allows us to remove the WIP status from the ActionView Overview
guide and reduce its size.
2020-06-18 21:26:00 +02:00