From 4d5060072b5446e0d13873f7edbecaf3527e7846 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Sun, 12 Mar 2017 19:37:48 +0530 Subject: Add link to mentioned API [ci skip] (#28392) --- guides/source/form_helpers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/form_helpers.md') diff --git a/guides/source/form_helpers.md b/guides/source/form_helpers.md index 8ad76ad01e..0508b0fb38 100644 --- a/guides/source/form_helpers.md +++ b/guides/source/form_helpers.md @@ -531,7 +531,7 @@ To leverage time zone support in Rails, you have to ask your users what time zon <%= time_zone_select(:person, :time_zone) %> ``` -There is also `time_zone_options_for_select` helper for a more manual (therefore more customizable) way of doing this. Read the API documentation to learn about the possible arguments for these two methods. +There is also `time_zone_options_for_select` helper for a more manual (therefore more customizable) way of doing this. Read the [API documentation](http://api.rubyonrails.org/classes/ActionView/Helpers/FormOptionsHelper.html#method-i-time_zone_options_for_select) to learn about the possible arguments for these two methods. Rails _used_ to have a `country_select` helper for choosing countries, but this has been extracted to the [country_select plugin](https://github.com/stefanpenner/country_select). When using this, be aware that the exclusion or inclusion of certain names from the list can be somewhat controversial (and was the reason this functionality was extracted from Rails). -- cgit v1.2.3 From dcd6ceb0c90866272b3e75f9d34ef9f13cfb33c6 Mon Sep 17 00:00:00 2001 From: marksiemers Date: Wed, 15 Mar 2017 12:38:49 -0700 Subject: Update 'Building Complex Forms' with `inverse_of` If the example for complex forms is implemented, ActiveRecord will prevent saving unless `inverse_of: :person` is added to the `has_many :addresses` association. --- guides/source/form_helpers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/form_helpers.md') diff --git a/guides/source/form_helpers.md b/guides/source/form_helpers.md index 0508b0fb38..95c2e33dc7 100644 --- a/guides/source/form_helpers.md +++ b/guides/source/form_helpers.md @@ -877,7 +877,7 @@ Active Record provides model level support via the `accepts_nested_attributes_fo ```ruby class Person < ApplicationRecord - has_many :addresses + has_many :addresses, inverse_of: :person accepts_nested_attributes_for :addresses end -- cgit v1.2.3 From 2b82e96597d4d9a6054bdeea86e51477565ac449 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Wed, 19 Apr 2017 08:02:32 +0900 Subject: Remove datetime fields from helper list [ci skip] The `datetime_field` is an alias of the `datetime_local_field`, there is no helper to generate datetime fields. Ref: #25469 --- guides/source/form_helpers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/form_helpers.md') diff --git a/guides/source/form_helpers.md b/guides/source/form_helpers.md index 0508b0fb38..ba6e158ba1 100644 --- a/guides/source/form_helpers.md +++ b/guides/source/form_helpers.md @@ -164,7 +164,7 @@ make it easier for users to click the inputs. Other form controls worth mentioning are textareas, password fields, hidden fields, search fields, telephone fields, date fields, time fields, -color fields, datetime fields, datetime-local fields, month fields, week fields, +color fields, datetime-local fields, month fields, week fields, URL fields, email fields, number fields and range fields: ```erb -- cgit v1.2.3