| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Add missing `+` around a some literals.
|
| |
| |
| |
| |
| |
| | |
Mainly around `nil`
[ci skip]
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
| |
Recently, the Rails team made an effort to keep the source code consistent, using Ruboco
(bb1ecdcc677bf6e68e0252505509c089619b5b90 and below). Some of the case
statements were missed.
This changes the case statements' formatting and is consistent with changes
in 810dff7c9fa9b2a38eb1560ce0378d760529ee6b and db63406cb007ab3756d2a96d2e0b5d4e777f8231.
|
| |
|
|
|
|
|
|
|
|
| |
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
|
| |
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|\
| |
| | |
Make select_year work with include_position: true option, fix #25267
|
| | |
|
|/
|
|
|
|
| |
This method is used in `distance_of_time_in_words`
Fixes #25357
|
| |
|
| |
|
|\
| |
| |
| |
| |
| | |
neumayr/date_select_helper_with_css_classes_accept_hash
date_select helper with_css_classes option also accept a hash
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`date_select` helper `:with_css_classes` option now accepts a hash of strings
for `:year`, `:month`, `:day`, `:hour`, `:minute`, `:second` that will extend
the select type with the given css class value.
```erb
<%= f.date_select :birthday, with_css_classes: { month: "my-month", year: "my-year" } %>
```
```html
<select id="user_birthday_3i" name="user[birthday(3i)]">…</select>
<select id="user_birthday_2i" name="user[birthday(2i)]" class="my-month">…</select>
<select id="user_birthday_1i" name="user[birthday(1i)]" class="my-year">…</select>
```
Optional, add global `html_options` to modify every select tag in the set.
```erb
<%= f.date_select :birthday, with_css_classes: { month: "my-month", year: "my-year" }, { class: "my-date optional" } %>
```
Supported DateHelper methods: `select_day`, `select_month`, `select_year`,
`select_hour`, `select_minute`, `select_second`, `select_datetime`, `select_time`,
`time_select`, `date_select` and `datetime_select`.
`:with_css_classes` option was added to the `date_select` with #7975.
|
| |
|
|
|
|
|
|
|
|
| |
{day: params[:day].to_i, month: params[:month].to_id}
Adds in test test_date_select_with_selected_in_hash and change log
fixes typo in CHANGELOG
|
|
|
|
| |
skip]
|
|
|
|
|
|
| |
content_tag's first argument is will generate a string with an html tag so `:a` will generate: `<a></a>`. When this happens, the symbol is implicitly `to_s`-d so a new string is allocated. We can get around that by using a frozen string instead which
This change buys us 74,236 bytes of memory and 1,855 fewer objects per request.
|
|
|
|
| |
Various grammar corrections and wrap to 80 characters.
|
| |
|
|\
| |
| |
| |
| | |
Conflicts:
guides/source/configuring.md
|
| |
| |
| |
| | |
This is same type commit of https://github.com/rails/rails/pull/20463
|
| | |
|
| |
| |
| |
| | |
[ci skip]
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
[skip ci]
|
|
|
| |
Rename `include_seconds_or_options` to `options` to match 6b9356a (which removed the deprecation introduced by #6077). This has no functional impact because the parameter is passed directly through, but makes it clearer that the parameter no longer supports a boolean as input.
|
|
|
|
|
| |
with_css_classes: true option overwrites other html classes.
Concatenate day month and year classes rather than overwriting.
|
|
|
|
|
|
|
| |
Refactor numerical constants to module constants which give the numbers
a contextual meaning. This commit aims to provide quicker understanding
for part of the implementation of the
DateHelper#distance_of_time_in_words method.
|
|
|
|
| |
#13618]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- While editing an existing record, end_year is equal to current selected year plus 5 by default.
- While editing an existing record, start_year is equal to current selected year value minus 5 by default.
- Fixes #13552
Acked-by: Prathamesh Sonpatki <csonpatki@gmail.com>
Acked-by: Prathamesh Sonpatki <csonpatki@gmail.com>
|
| |
|
| |
|
| |
|
|
|
| |
The variable name created in the example is `my_date`, the methods were using `my_time` instead.
|
|
|
|
| |
Pass in an :include_seconds hash option to use this feature.
|
|
|