sorbet/rbi/gems/simple_form@5.1.0.rbi
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `simple_form` gem.
# Please instead update this file by running `bin/tapioca gem simple_form`.
# source://simple_form-5.1.0/lib/simple_form/action_view_extensions/builder.rb:34
module ActionView::Helpers
include ::ActionView::Helpers::SanitizeHelper
include ::ActionView::Helpers::TagHelper
include ::ActionView::Helpers::TextHelper
include ::ActionView::Helpers::TagHelper
include ::ActionView::Helpers::AssetTagHelper
include ::ActionView::Helpers::UrlHelper
include ::ActionView::Helpers::SanitizeHelper
include ::ActionView::Helpers::TextHelper
include ::ActionView::Helpers::FormTagHelper
include ::ActionView::Helpers::FormHelper
include ::ActionView::Helpers::TranslationHelper
mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods
mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods
class << self
# source://actionview-5.2.8.1/lib/action_view/helpers.rb:35
def eager_load!; end
end
end
# A +FormBuilder+ object is associated with a particular model object and
# allows you to generate fields associated with the model object. The
# +FormBuilder+ object is yielded when using +form_for+ or +fields_for+.
# For example:
#
# <%= form_for @person do |person_form| %>
# Name: <%= person_form.text_field :name %>
# Admin: <%= person_form.check_box :admin %>
# <% end %>
#
# In the above block, a +FormBuilder+ object is yielded as the
# +person_form+ variable. This allows you to generate the +text_field+
# and +check_box+ fields by specifying their eponymous methods, which
# modify the underlying template and associates the <tt>@person</tt> model object
# with the form.
#
# The +FormBuilder+ object can be thought of as serving as a proxy for the
# methods in the +FormHelper+ module. This class, however, allows you to
# call methods with the model object you are building the form for.
#
# You can create your own custom FormBuilder templates by subclassing this
# class. For example:
#
# class MyFormBuilder < ActionView::Helpers::FormBuilder
# def div_radio_button(method, tag_value, options = {})
# @template.content_tag(:div,
# @template.radio_button(
# @object_name, method, tag_value, objectify_options(options)
# )
# )
# end
# end
#
# The above code creates a new method +div_radio_button+ which wraps a div
# around the new radio button. Note that when options are passed in, you
# must call +objectify_options+ in order for the model object to get
# correctly passed to the method. If +objectify_options+ is not called,
# then the newly created helper will not be linked back to the model.
#
# The +div_radio_button+ code from above can now be used as follows:
#
# <%= form_for @person, :builder => MyFormBuilder do |f| %>
# I am a child: <%= f.div_radio_button(:admin, "child") %>
# I am an adult: <%= f.div_radio_button(:admin, "adult") %>
# <% end -%>
#
# The standard set of helper methods for form building are located in the
# +field_helpers+ class attribute.
#
# source://simple_form-5.1.0/lib/simple_form/action_view_extensions/builder.rb:35
class ActionView::Helpers::FormBuilder
include ::SimpleForm::ActionViewExtensions::Builder
# @return [FormBuilder] a new instance of FormBuilder
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1657
def initialize(object_name, object, template, options); end
# Add the submit button for the given form. When no value is given, it checks
# if the object is a new resource or not to create the proper label:
#
# <%= form_for @post do |f| %>
# <%= f.button %>
# <% end %>
#
# In the example above, if <tt>@post</tt> is a new record, it will use "Create Post" as
# button label; otherwise, it uses "Update Post".
#
# Those labels can be customized using I18n under the +helpers.submit+ key
# (the same as submit helper) and using <tt>%{model}</tt> for translation interpolation:
#
# en:
# helpers:
# submit:
# create: "Create a %{model}"
# update: "Confirm changes to %{model}"
#
# It also searches for a key specific to the given object:
#
# en:
# helpers:
# submit:
# post:
# create: "Add %{model}"
#
# ==== Examples
# button("Create post")
# # => <button name='button' type='submit'>Create post</button>
#
# button do
# content_tag(:strong, 'Ask me!')
# end
# # => <button name='button' type='submit'>
# # <strong>Ask me!</strong>
# # </button>
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2244
def button(value = T.unsafe(nil), options = T.unsafe(nil), &block); end
# Returns a checkbox tag tailored for accessing a specified attribute (identified by +method+) on an object
# assigned to the template (identified by +object+). This object must be an instance object (@object) and not a local object.
# It's intended that +method+ returns an integer and if that integer is above zero, then the checkbox is checked.
# Additional options on the input tag can be passed as a hash with +options+. The +checked_value+ defaults to 1
# while the default +unchecked_value+ is set to 0 which is convenient for boolean values.
#
# ==== Gotcha
#
# The HTML specification says unchecked check boxes are not successful, and
# thus web browsers do not send them. Unfortunately this introduces a gotcha:
# if an +Invoice+ model has a +paid+ flag, and in the form that edits a paid
# invoice the user unchecks its check box, no +paid+ parameter is sent. So,
# any mass-assignment idiom like
#
# @invoice.update(params[:invoice])
#
# wouldn't update the flag.
#
# To prevent this the helper generates an auxiliary hidden field before
# the very check box. The hidden field has the same name and its
# attributes mimic an unchecked check box.
#
# This way, the client either sends only the hidden field (representing
# the check box is unchecked), or both fields. Since the HTML specification
# says key/value pairs have to be sent in the same order they appear in the
# form, and parameters extraction gets the last occurrence of any repeated
# key in the query string, that works for ordinary forms.
#
# Unfortunately that workaround does not work when the check box goes
# within an array-like parameter, as in
#
# <%= fields_for "project[invoice_attributes][]", invoice, index: nil do |form| %>
# <%= form.check_box :paid %>
# ...
# <% end %>
#
# because parameter name repetition is precisely what Rails seeks to distinguish
# the elements of the array. For each item with a checked check box you
# get an extra ghost item with only that attribute, assigned to "0".
#
# In that case it is preferable to either use +check_box_tag+ or to use
# hashes instead of arrays.
#
# # Let's say that @post.validated? is 1:
# check_box("validated")
# # => <input name="post[validated]" type="hidden" value="0" />
# # <input checked="checked" type="checkbox" id="post_validated" name="post[validated]" value="1" />
#
# # Let's say that @puppy.gooddog is "no":
# check_box("gooddog", {}, "yes", "no")
# # => <input name="puppy[gooddog]" type="hidden" value="no" />
# # <input type="checkbox" id="puppy_gooddog" name="puppy[gooddog]" value="yes" />
#
# # Let's say that @eula.accepted is "no":
# check_box("accepted", { class: 'eula_check' }, "yes", "no")
# # => <input name="eula[accepted]" type="hidden" value="no" />
# # <input type="checkbox" class="eula_check" id="eula_accepted" name="eula[accepted]" value="yes" />
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2086
def check_box(method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end
# Wraps ActionView::Helpers::FormOptionsHelper#collection_check_boxes for form builders:
#
# <%= form_for @post do |f| %>
# <%= f.collection_check_boxes :author_ids, Author.all, :id, :name_with_initial %>
# <%= f.submit %>
# <% end %>
#
# Please refer to the documentation of the base helper for details.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_options_helper.rb:870
def collection_check_boxes(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end
# Wraps ActionView::Helpers::FormOptionsHelper#collection_radio_buttons for form builders:
#
# <%= form_for @post do |f| %>
# <%= f.collection_radio_buttons :author_id, Author.all, :id, :name_with_initial %>
# <%= f.submit %>
# <% end %>
#
# Please refer to the documentation of the base helper for details.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_options_helper.rb:882
def collection_radio_buttons(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end
# Wraps ActionView::Helpers::FormOptionsHelper#collection_select for form builders:
#
# <%= form_for @post do |f| %>
# <%= f.collection_select :person_id, Author.all, :id, :name_with_initial, prompt: true %>
# <%= f.submit %>
# <% end %>
#
# Please refer to the documentation of the base helper for details.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_options_helper.rb:834
def collection_select(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def color_field(method, options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def date_field(method, options = T.unsafe(nil)); end
# Wraps ActionView::Helpers::DateHelper#date_select for form builders:
#
# <%= form_for @person do |f| %>
# <%= f.date_select :birth_date %>
# <%= f.submit %>
# <% end %>
#
# Please refer to the documentation of the base helper for details.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/date_helper.rb:1127
def date_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def datetime_field(method, options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def datetime_local_field(method, options = T.unsafe(nil)); end
# Wraps ActionView::Helpers::DateHelper#datetime_select for form builders:
#
# <%= form_for @person do |f| %>
# <%= f.datetime_select :last_request_at %>
# <%= f.submit %>
# <% end %>
#
# Please refer to the documentation of the base helper for details.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/date_helper.rb:1151
def datetime_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def email_field(method, options = T.unsafe(nil)); end
# @return [Boolean]
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2250
def emitted_hidden_id?; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:124
def field_helpers; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:136
def field_helpers=(val); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:132
def field_helpers?; end
# See the docs for the <tt>ActionView::FormHelper.fields</tt> helper method.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1968
def fields(scope = T.unsafe(nil), model: T.unsafe(nil), **options, &block); end
# Creates a scope around a specific model object like form_for, but
# doesn't create the form tags themselves. This makes fields_for suitable
# for specifying additional model objects in the same form.
#
# Although the usage and purpose of +fields_for+ is similar to +form_for+'s,
# its method signature is slightly different. Like +form_for+, it yields
# a FormBuilder object associated with a particular model object to a block,
# and within the block allows methods to be called on the builder to
# generate fields associated with the model object. Fields may reflect
# a model object in two ways - how they are named (hence how submitted
# values appear within the +params+ hash in the controller) and what
# default values are shown when the form the fields appear in is first
# displayed. In order for both of these features to be specified independently,
# both an object name (represented by either a symbol or string) and the
# object itself can be passed to the method separately -
#
# <%= form_for @person do |person_form| %>
# First name: <%= person_form.text_field :first_name %>
# Last name : <%= person_form.text_field :last_name %>
#
# <%= fields_for :permission, @person.permission do |permission_fields| %>
# Admin? : <%= permission_fields.check_box :admin %>
# <% end %>
#
# <%= person_form.submit %>
# <% end %>
#
# In this case, the checkbox field will be represented by an HTML +input+
# tag with the +name+ attribute <tt>permission[admin]</tt>, and the submitted
# value will appear in the controller as <tt>params[:permission][:admin]</tt>.
# If <tt>@person.permission</tt> is an existing record with an attribute
# +admin+, the initial state of the checkbox when first displayed will
# reflect the value of <tt>@person.permission.admin</tt>.
#
# Often this can be simplified by passing just the name of the model
# object to +fields_for+ -
#
# <%= fields_for :permission do |permission_fields| %>
# Admin?: <%= permission_fields.check_box :admin %>
# <% end %>
#
# ...in which case, if <tt>:permission</tt> also happens to be the name of an
# instance variable <tt>@permission</tt>, the initial state of the input
# field will reflect the value of that variable's attribute <tt>@permission.admin</tt>.
#
# Alternatively, you can pass just the model object itself (if the first
# argument isn't a string or symbol +fields_for+ will realize that the
# name has been omitted) -
#
# <%= fields_for @person.permission do |permission_fields| %>
# Admin?: <%= permission_fields.check_box :admin %>
# <% end %>
#
# and +fields_for+ will derive the required name of the field from the
# _class_ of the model object, e.g. if <tt>@person.permission</tt>, is
# of class +Permission+, the field will still be named <tt>permission[admin]</tt>.
#
# Note: This also works for the methods in FormOptionsHelper and
# DateHelper that are designed to work with an object as base, like
# FormOptionsHelper#collection_select and DateHelper#datetime_select.
#
# === Nested Attributes Examples
#
# When the object belonging to the current scope has a nested attribute
# writer for a certain attribute, fields_for will yield a new scope
# for that attribute. This allows you to create forms that set or change
# the attributes of a parent object and its associations in one go.
#
# Nested attribute writers are normal setter methods named after an
# association. The most common way of defining these writers is either
# with +accepts_nested_attributes_for+ in a model definition or by
# defining a method with the proper name. For example: the attribute
# writer for the association <tt>:address</tt> is called
# <tt>address_attributes=</tt>.
#
# Whether a one-to-one or one-to-many style form builder will be yielded
# depends on whether the normal reader method returns a _single_ object
# or an _array_ of objects.
#
# ==== One-to-one
#
# Consider a Person class which returns a _single_ Address from the
# <tt>address</tt> reader method and responds to the
# <tt>address_attributes=</tt> writer method:
#
# class Person
# def address
# @address
# end
#
# def address_attributes=(attributes)
# # Process the attributes hash
# end
# end
#
# This model can now be used with a nested fields_for, like so:
#
# <%= form_for @person do |person_form| %>
# ...
# <%= person_form.fields_for :address do |address_fields| %>
# Street : <%= address_fields.text_field :street %>
# Zip code: <%= address_fields.text_field :zip_code %>
# <% end %>
# ...
# <% end %>
#
# When address is already an association on a Person you can use
# +accepts_nested_attributes_for+ to define the writer method for you:
#
# class Person < ActiveRecord::Base
# has_one :address
# accepts_nested_attributes_for :address
# end
#
# If you want to destroy the associated model through the form, you have
# to enable it first using the <tt>:allow_destroy</tt> option for
# +accepts_nested_attributes_for+:
#
# class Person < ActiveRecord::Base
# has_one :address
# accepts_nested_attributes_for :address, allow_destroy: true
# end
#
# Now, when you use a form element with the <tt>_destroy</tt> parameter,
# with a value that evaluates to +true+, you will destroy the associated
# model (eg. 1, '1', true, or 'true'):
#
# <%= form_for @person do |person_form| %>
# ...
# <%= person_form.fields_for :address do |address_fields| %>
# ...
# Delete: <%= address_fields.check_box :_destroy %>
# <% end %>
# ...
# <% end %>
#
# ==== One-to-many
#
# Consider a Person class which returns an _array_ of Project instances
# from the <tt>projects</tt> reader method and responds to the
# <tt>projects_attributes=</tt> writer method:
#
# class Person
# def projects
# [@project1, @project2]
# end
#
# def projects_attributes=(attributes)
# # Process the attributes hash
# end
# end
#
# Note that the <tt>projects_attributes=</tt> writer method is in fact
# required for fields_for to correctly identify <tt>:projects</tt> as a
# collection, and the correct indices to be set in the form markup.
#
# When projects is already an association on Person you can use
# +accepts_nested_attributes_for+ to define the writer method for you:
#
# class Person < ActiveRecord::Base
# has_many :projects
# accepts_nested_attributes_for :projects
# end
#
# This model can now be used with a nested fields_for. The block given to
# the nested fields_for call will be repeated for each instance in the
# collection:
#
# <%= form_for @person do |person_form| %>
# ...
# <%= person_form.fields_for :projects do |project_fields| %>
# <% if project_fields.object.active? %>
# Name: <%= project_fields.text_field :name %>
# <% end %>
# <% end %>
# ...
# <% end %>
#
# It's also possible to specify the instance to be used:
#
# <%= form_for @person do |person_form| %>
# ...
# <% @person.projects.each do |project| %>
# <% if project.active? %>
# <%= person_form.fields_for :projects, project do |project_fields| %>
# Name: <%= project_fields.text_field :name %>
# <% end %>
# <% end %>
# <% end %>
# ...
# <% end %>
#
# Or a collection to be used:
#
# <%= form_for @person do |person_form| %>
# ...
# <%= person_form.fields_for :projects, @active_projects do |project_fields| %>
# Name: <%= project_fields.text_field :name %>
# <% end %>
# ...
# <% end %>
#
# If you want to destroy any of the associated models through the
# form, you have to enable it first using the <tt>:allow_destroy</tt>
# option for +accepts_nested_attributes_for+:
#
# class Person < ActiveRecord::Base
# has_many :projects
# accepts_nested_attributes_for :projects, allow_destroy: true
# end
#
# This will allow you to specify which models to destroy in the
# attributes hash by adding a form element for the <tt>_destroy</tt>
# parameter with a value that evaluates to +true+
# (eg. 1, '1', true, or 'true'):
#
# <%= form_for @person do |person_form| %>
# ...
# <%= person_form.fields_for :projects do |project_fields| %>
# Delete: <%= project_fields.check_box :_destroy %>
# <% end %>
# ...
# <% end %>
#
# When a collection is used you might want to know the index of each
# object into the array. For this purpose, the <tt>index</tt> method
# is available in the FormBuilder object.
#
# <%= form_for @person do |person_form| %>
# ...
# <%= person_form.fields_for :projects do |project_fields| %>
# Project #<%= project_fields.index %>
# ...
# <% end %>
# ...
# <% end %>
#
# Note that fields_for will automatically generate a hidden field
# to store the ID of the record. There are circumstances where this
# hidden field is not needed and you can pass <tt>include_id: false</tt>
# to prevent fields_for from rendering it automatically.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1930
def fields_for(record_name, record_object = T.unsafe(nil), fields_options = T.unsafe(nil), &block); end
# Returns a file upload input tag tailored for accessing a specified attribute (identified by +method+) on an object
# assigned to the template (identified by +object+). Additional options on the input tag can be passed as a
# hash with +options+. These options will be tagged onto the HTML as an HTML element attribute as in the example
# shown.
#
# Using this method inside a +form_for+ block will set the enclosing form's encoding to <tt>multipart/form-data</tt>.
#
# ==== Options
# * Creates standard HTML attributes for the tag.
# * <tt>:disabled</tt> - If set to true, the user will not be able to use this input.
# * <tt>:multiple</tt> - If set to true, *in most updated browsers* the user will be allowed to select multiple files.
# * <tt>:accept</tt> - If set to one or multiple mime-types, the user will be suggested a filter when choosing a file. You still need to set up model validations.
#
# ==== Examples
# # Let's say that @user has avatar:
# file_field(:avatar)
# # => <input type="file" id="user_avatar" name="user[avatar]" />
#
# # Let's say that @post has image:
# file_field(:image, :multiple => true)
# # => <input type="file" id="post_image" name="post[image][]" multiple="multiple" />
#
# # Let's say that @post has attached:
# file_field(:attached, accept: 'text/html')
# # => <input accept="text/html" type="file" id="post_attached" name="post[attached]" />
#
# # Let's say that @post has image:
# file_field(:image, accept: 'image/png,image/gif,image/jpeg')
# # => <input type="file" id="post_image" name="post[image]" accept="image/png,image/gif,image/jpeg" />
#
# # Let's say that @attachment has file:
# file_field(:file, class: 'file_input')
# # => <input type="file" id="attachment_file" name="attachment[file]" class="file_input" />
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2168
def file_field(method, options = T.unsafe(nil)); end
# Wraps ActionView::Helpers::FormOptionsHelper#grouped_collection_select for form builders:
#
# <%= form_for @city do |f| %>
# <%= f.grouped_collection_select :country_id, @continents, :countries, :name, :id, :name %>
# <%= f.submit %>
# <% end %>
#
# Please refer to the documentation of the base helper for details.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_options_helper.rb:846
def grouped_collection_select(method, collection, group_method, group_label_method, option_key_method, option_value_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end
# Returns a hidden input tag tailored for accessing a specified attribute (identified by +method+) on an object
# assigned to the template (identified by +object+). Additional options on the input tag can be passed as a
# hash with +options+. These options will be tagged onto the HTML as an HTML element attribute as in the example
# shown.
#
# ==== Examples
# # Let's say that @signup.pass_confirm returns true:
# hidden_field(:pass_confirm)
# # => <input type="hidden" id="signup_pass_confirm" name="signup[pass_confirm]" value="true" />
#
# # Let's say that @post.tag_list returns "blog, ruby":
# hidden_field(:tag_list)
# # => <input type="hidden" id="post_tag_list" name="post[tag_list]" value="blog, ruby" />
#
# # Let's say that @user.token returns "abcde":
# hidden_field(:token)
# # => <input type="hidden" id="user_token" name="user[token]" value="abcde" />
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2130
def hidden_field(method, options = T.unsafe(nil)); end
# Returns the value of attribute index.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1634
def index; end
# Returns a label tag tailored for labelling an input field for a specified attribute (identified by +method+) on an object
# assigned to the template (identified by +object+). The text of label will default to the attribute name unless a translation
# is found in the current I18n locale (through helpers.label.<modelname>.<attribute>) or you specify it explicitly.
# Additional options on the label tag can be passed as a hash with +options+. These options will be tagged
# onto the HTML as an HTML element attribute as in the example shown, except for the <tt>:value</tt> option, which is designed to
# target labels for radio_button tags (where the value is used in the ID of the input tag).
#
# ==== Examples
# label(:title)
# # => <label for="post_title">Title</label>
#
# You can localize your labels based on model and attribute names.
# For example you can define the following in your locale (e.g. en.yml)
#
# helpers:
# label:
# post:
# body: "Write your entire text here"
#
# Which then will result in
#
# label(:body)
# # => <label for="post_body">Write your entire text here</label>
#
# Localization can also be based purely on the translation of the attribute-name
# (if you are using ActiveRecord):
#
# activerecord:
# attributes:
# post:
# cost: "Total cost"
#
# label(:cost)
# # => <label for="post_cost">Total cost</label>
#
# label(:title, "A short title")
# # => <label for="post_title">A short title</label>
#
# label(:title, "A short title", class: "title_label")
# # => <label for="post_title" class="title_label">A short title</label>
#
# label(:privacy, "Public Post", value: "public")
# # => <label for="post_privacy_public">Public Post</label>
#
# label(:terms) do
# raw('Accept <a href="/terms">Terms</a>.')
# end
# # => <label for="post_terms">Accept <a href="/terms">Terms</a>.</label>
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2025
def label(method, text = T.unsafe(nil), options = T.unsafe(nil), &block); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def month_field(method, options = T.unsafe(nil)); end
# Returns the value of attribute multipart.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1634
def multipart; end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1637
def multipart=(multipart); end
# Returns the value of attribute multipart.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1634
def multipart?; end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def number_field(method, options = T.unsafe(nil)); end
# Returns the value of attribute object.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1632
def object; end
# Sets the attribute object
#
# @param value the value to set the attribute object to.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1632
def object=(_arg0); end
# Returns the value of attribute object_name.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1632
def object_name; end
# Sets the attribute object_name
#
# @param value the value to set the attribute object_name to.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1632
def object_name=(_arg0); end
# Returns the value of attribute options.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1632
def options; end
# Sets the attribute options
#
# @param value the value to set the attribute options to.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1632
def options=(_arg0); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def password_field(method, options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def phone_field(method, options = T.unsafe(nil)); end
# Returns a radio button tag for accessing a specified attribute (identified by +method+) on an object
# assigned to the template (identified by +object+). If the current value of +method+ is +tag_value+ the
# radio button will be checked.
#
# To force the radio button to be checked pass <tt>checked: true</tt> in the
# +options+ hash. You may pass HTML options there as well.
#
# # Let's say that @post.category returns "rails":
# radio_button("category", "rails")
# radio_button("category", "java")
# # => <input type="radio" id="post_category_rails" name="post[category]" value="rails" checked="checked" />
# # <input type="radio" id="post_category_java" name="post[category]" value="java" />
#
# # Let's say that @user.receive_newsletter returns "no":
# radio_button("receive_newsletter", "yes")
# radio_button("receive_newsletter", "no")
# # => <input type="radio" id="user_receive_newsletter_yes" name="user[receive_newsletter]" value="yes" />
# # <input type="radio" id="user_receive_newsletter_no" name="user[receive_newsletter]" value="no" checked="checked" />
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2108
def radio_button(method, tag_value, options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def range_field(method, options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def search_field(method, options = T.unsafe(nil)); end
# Wraps ActionView::Helpers::FormOptionsHelper#select for form builders:
#
# <%= form_for @post do |f| %>
# <%= f.select :person_id, Person.all.collect { |p| [ p.name, p.id ] }, include_blank: true %>
# <%= f.submit %>
# <% end %>
#
# Please refer to the documentation of the base helper for details.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_options_helper.rb:822
def select(method, choices = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end
# Add the submit button for the given form. When no value is given, it checks
# if the object is a new resource or not to create the proper label:
#
# <%= form_for @post do |f| %>
# <%= f.submit %>
# <% end %>
#
# In the example above, if <tt>@post</tt> is a new record, it will use "Create Post" as
# submit button label; otherwise, it uses "Update Post".
#
# Those labels can be customized using I18n under the +helpers.submit+ key and using
# <tt>%{model}</tt> for translation interpolation:
#
# en:
# helpers:
# submit:
# create: "Create a %{model}"
# update: "Confirm changes to %{model}"
#
# It also searches for a key specific to the given object:
#
# en:
# helpers:
# submit:
# post:
# create: "Add %{model}"
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2200
def submit(value = T.unsafe(nil), options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def telephone_field(method, options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def text_area(method, options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def text_field(method, options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def time_field(method, options = T.unsafe(nil)); end
# Wraps ActionView::Helpers::DateHelper#time_select for form builders:
#
# <%= form_for @race do |f| %>
# <%= f.time_select :average_lap %>
# <%= f.submit %>
# <% end %>
#
# Please refer to the documentation of the base helper for details.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/date_helper.rb:1139
def time_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end
# Wraps ActionView::Helpers::FormOptionsHelper#time_zone_select for form builders:
#
# <%= form_for @user do |f| %>
# <%= f.time_zone_select :time_zone, nil, include_blank: true %>
# <%= f.submit %>
# <% end %>
#
# Please refer to the documentation of the base helper for details.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_options_helper.rb:858
def time_zone_select(method, priority_zones = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1653
def to_model; end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1649
def to_partial_path; end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def url_field(method, options = T.unsafe(nil)); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1679
def week_field(method, options = T.unsafe(nil)); end
private
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2326
def convert_to_legacy_options(options); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2308
def fields_for_nested_model(name, object, fields_options, block); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2281
def fields_for_with_nested_attributes(association_name, association, options, block); end
# @return [Boolean]
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2277
def nested_attributes_association?(association_name); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2321
def nested_child_index(name); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2255
def objectify_options(options); end
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2259
def submit_default_value; end
class << self
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:1645
def _to_partial_path; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:106
def field_helpers; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:104
def field_helpers=(val); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:99
def field_helpers?; end
end
end
# source://simple_form-5.1.0/lib/simple_form/action_view_extensions/form_helper.rb:2
module SimpleForm
extend ::ActiveSupport::Autoload
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def boolean_label_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def boolean_label_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def boolean_style; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def boolean_style=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def browser_validations; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def browser_validations=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def button_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def button_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def cache_discovery; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def cache_discovery=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def collection_label_methods; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def collection_label_methods=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def collection_value_methods; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def collection_value_methods=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def collection_wrapper_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def collection_wrapper_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def collection_wrapper_tag; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def collection_wrapper_tag=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def country_priority; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def country_priority=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def custom_inputs_namespaces; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def custom_inputs_namespaces=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def default_form_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def default_form_class=(obj); end
# WRAPPER CONFIGURATION
# The default wrapper to be used by the FormBuilder.
#
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def default_wrapper; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def default_wrapper=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def error_method; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def error_method=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def error_notification_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def error_notification_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def error_notification_tag; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def error_notification_tag=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def field_error_proc; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def field_error_proc=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def form_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def generate_additional_classes_for; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def generate_additional_classes_for=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def i18n_scope; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def i18n_scope=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def include_default_input_wrapper_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def include_default_input_wrapper_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def input_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def input_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def input_field_error_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def input_field_error_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def input_field_valid_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def input_field_valid_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def input_mappings; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def input_mappings=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def inputs_discovery; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def inputs_discovery=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def item_wrapper_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def item_wrapper_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def item_wrapper_tag; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def item_wrapper_tag=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def label_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def label_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def label_text; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def label_text=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def required_by_default; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def required_by_default=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def time_zone_priority; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def time_zone_priority=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def translate_labels; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def translate_labels=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def wrapper_mappings; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def wrapper_mappings=(obj); end
class << self
# source://simple_form-5.1.0/lib/simple_form.rb:260
def additional_classes_for(component); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def boolean_label_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def boolean_label_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def boolean_style; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def boolean_style=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def browser_validations; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def browser_validations=(obj); end
# Builds a new wrapper using SimpleForm::Wrappers::Builder.
#
# @yield [builder]
#
# source://simple_form-5.1.0/lib/simple_form.rb:238
def build(options = T.unsafe(nil)); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def button_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def button_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def cache_discovery; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def cache_discovery=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def collection_label_methods; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def collection_label_methods=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def collection_value_methods; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def collection_value_methods=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def collection_wrapper_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def collection_wrapper_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def collection_wrapper_tag; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def collection_wrapper_tag=(obj); end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form.rb:54
def configured?; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def country_priority; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def country_priority=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def custom_inputs_namespaces; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def custom_inputs_namespaces=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def default_form_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def default_form_class=(obj); end
# SETUP
#
# source://simple_form-5.1.0/lib/simple_form.rb:266
def default_input_size=(*_arg0); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def default_wrapper; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def default_wrapper=(obj); end
# source://simple_form-5.1.0/lib/simple_form.rb:23
def eager_load!; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def error_method; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def error_method=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def error_notification_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def error_notification_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def error_notification_tag; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def error_notification_tag=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def field_error_proc; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def field_error_proc=(obj); end
# source://simple_form-5.1.0/lib/simple_form.rb:280
def file_methods; end
# source://simple_form-5.1.0/lib/simple_form.rb:275
def file_methods=(file_methods); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def form_class; end
# source://simple_form-5.1.0/lib/simple_form.rb:270
def form_class=(value); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def generate_additional_classes_for; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def generate_additional_classes_for=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def i18n_scope; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def i18n_scope=(obj); end
# Includes a component to be used by Simple Form. Methods defined in a
# component will be exposed to be used in the wrapper as Simple::Components
#
# Examples
#
# # The application needs to tell where the components will be.
# Dir[Rails.root.join('lib/components/**/*.rb')].each { |f| require f }
#
# # Create a custom component in the path specified above.
# # lib/components/input_group_component.rb
# module InputGroupComponent
# def prepend
# ...
# end
#
# def append
# ...
# end
# end
#
# SimpleForm.setup do |config|
# # Create a wrapper using the custom component.
# config.wrappers :input_group, tag: :div, error_class: :error do |b|
# b.use :label
# b.optional :prepend
# b.use :input
# b.use :append
# end
# end
#
# # Using the custom component in the form.
# <%= simple_form_for @blog, wrapper: input_group do |f| %>
# <%= f.input :title, prepend: true %>
# <% end %>
#
# source://simple_form-5.1.0/lib/simple_form.rb:327
def include_component(component); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def include_default_input_wrapper_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def include_default_input_wrapper_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def input_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def input_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def input_field_error_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def input_field_error_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def input_field_valid_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def input_field_valid_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def input_mappings; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def input_mappings=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def inputs_discovery; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def inputs_discovery=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def item_wrapper_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def item_wrapper_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def item_wrapper_tag; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def item_wrapper_tag=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def label_class; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def label_class=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def label_text; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def label_text=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def required_by_default; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def required_by_default=(obj); end
# Default way to setup Simple Form. Run rails generate simple_form:install
# to create a fresh initializer with all configuration values.
#
# @yield [_self]
# @yieldparam _self [SimpleForm] the object that the method was called on
#
# source://simple_form-5.1.0/lib/simple_form.rb:287
def setup; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def time_zone_priority; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def time_zone_priority=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def translate_labels; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def translate_labels=(obj); end
# Retrieves a given wrapper
#
# source://simple_form-5.1.0/lib/simple_form.rb:217
def wrapper(name); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def wrapper_mappings; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def wrapper_mappings=(obj); end
# Define a new wrapper using SimpleForm::Wrappers::Builder
# and store it in the given name.
#
# source://simple_form-5.1.0/lib/simple_form.rb:227
def wrappers(*args, &block); end
end
end
# source://simple_form-5.1.0/lib/simple_form/action_view_extensions/form_helper.rb:3
module SimpleForm::ActionViewExtensions; end
# A collection of methods required by simple_form but added to rails default form.
# This means that you can use such methods outside simple_form context.
#
# source://simple_form-5.1.0/lib/simple_form/action_view_extensions/builder.rb:6
module SimpleForm::ActionViewExtensions::Builder
# Wrapper for using SimpleForm inside a default rails form.
# Example:
#
# form_for @user do |f|
# f.simple_fields_for :posts do |posts_form|
# # Here you have all simple_form methods available
# posts_form.input :title
# end
# end
#
# source://simple_form-5.1.0/lib/simple_form/action_view_extensions/builder.rb:17
def simple_fields_for(*args, &block); end
end
# This module creates SimpleForm wrappers around default form_for and fields_for.
#
# Example:
#
# simple_form_for @user do |f|
# f.input :name, hint: 'My hint'
# end
#
# source://simple_form-5.1.0/lib/simple_form/action_view_extensions/form_helper.rb:12
module SimpleForm::ActionViewExtensions::FormHelper
# source://simple_form-5.1.0/lib/simple_form/action_view_extensions/form_helper.rb:31
def simple_fields_for(record_name, record_object = T.unsafe(nil), options = T.unsafe(nil), &block); end
# source://simple_form-5.1.0/lib/simple_form/action_view_extensions/form_helper.rb:14
def simple_form_for(record, options = T.unsafe(nil), &block); end
private
# source://simple_form-5.1.0/lib/simple_form/action_view_extensions/form_helper.rb:52
def simple_form_css_class(record, options); end
# source://simple_form-5.1.0/lib/simple_form/action_view_extensions/form_helper.rb:42
def with_simple_form_field_error_proc; end
end
# source://simple_form-5.1.0/lib/simple_form.rb:29
SimpleForm::CUSTOM_INPUT_DEPRECATION_WARN = T.let(T.unsafe(nil), String)
# Components are a special type of helpers that can work on their own.
# For example, by using a component, it will automatically change the
# output under given circumstances without user input. For example,
# the disabled helper always need a disabled: true option given
# to the input in order to be enabled. On the other hand, things like
# hints can generate output automatically by doing I18n lookups.
#
# source://simple_form-5.1.0/lib/simple_form/components.rb:9
module SimpleForm::Components
extend ::ActiveSupport::Autoload
end
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:4
module SimpleForm::Components::Errors
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:5
def error(wrapper_options = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:9
def full_error(wrapper_options = T.unsafe(nil)); end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:13
def has_errors?; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:17
def has_value?; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:21
def valid?; end
protected
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:41
def error_method; end
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:27
def error_text; end
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:45
def errors; end
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:61
def errors_on_association; end
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:53
def errors_on_attribute; end
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:33
def full_error_text; end
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:49
def full_errors; end
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:65
def full_errors_on_association; end
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:57
def full_errors_on_attribute; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:69
def has_custom_error?; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/components/errors.rb:37
def object_with_errors?; end
end
# source://simple_form-5.1.0/lib/simple_form/components/html5.rb:4
module SimpleForm::Components::HTML5
# source://simple_form-5.1.0/lib/simple_form/components/html5.rb:5
def initialize(*_arg0); end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/components/html5.rb:32
def has_required?; end
# source://simple_form-5.1.0/lib/simple_form/components/html5.rb:9
def html5(wrapper_options = T.unsafe(nil)); end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/components/html5.rb:20
def html5?; end
# source://simple_form-5.1.0/lib/simple_form/components/html5.rb:28
def input_html_aria_required_option; end
# source://simple_form-5.1.0/lib/simple_form/components/html5.rb:24
def input_html_required_option; end
end
# Needs to be enabled in order to do automatic lookups.
#
# source://simple_form-5.1.0/lib/simple_form/components/hints.rb:5
module SimpleForm::Components::Hints
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/components/hints.rb:19
def has_hint?; end
# source://simple_form-5.1.0/lib/simple_form/components/hints.rb:6
def hint(wrapper_options = T.unsafe(nil)); end
end
# source://simple_form-5.1.0/lib/simple_form/components/label_input.rb:4
module SimpleForm::Components::LabelInput
extend ::ActiveSupport::Concern
include ::SimpleForm::Components::Labels
mixes_in_class_methods ::SimpleForm::Components::Labels::ClassMethods
# source://simple_form-5.1.0/lib/simple_form/components/label_input.rb:11
def label_input(wrapper_options = T.unsafe(nil)); end
private
# source://simple_form-5.1.0/lib/simple_form/components/label_input.rb:21
def deprecated_component(namespace, wrapper_options); end
end
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:4
module SimpleForm::Components::Labels
extend ::ActiveSupport::Concern
mixes_in_class_methods ::SimpleForm::Components::Labels::ClassMethods
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:29
def label(wrapper_options = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:48
def label_html_options; end
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:44
def label_target; end
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:39
def label_text(wrapper_options = T.unsafe(nil)); end
protected
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:83
def generate_label_for_attribute?; end
# First check labels translation and then human attribute name.
#
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:73
def label_translation; end
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:63
def raw_label_text; end
# Default required text when attribute is required.
#
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:68
def required_label_text; end
end
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:7
module SimpleForm::Components::Labels::ClassMethods
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:8
def translate_required_html; end
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:18
def translate_required_mark; end
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:14
def translate_required_text; end
private
# source://simple_form-5.1.0/lib/simple_form/components/labels.rb:24
def i18n_scope; end
end
# Needs to be enabled in order to do automatic lookups.
#
# source://simple_form-5.1.0/lib/simple_form/components/maxlength.rb:5
module SimpleForm::Components::Maxlength
# source://simple_form-5.1.0/lib/simple_form/components/maxlength.rb:6
def maxlength(wrapper_options = T.unsafe(nil)); end
private
# source://simple_form-5.1.0/lib/simple_form/components/maxlength.rb:23
def find_length_validator; end
# source://simple_form-5.1.0/lib/simple_form/components/maxlength.rb:13
def maximum_length_from_validation; end
# source://simple_form-5.1.0/lib/simple_form/components/maxlength.rb:27
def maximum_length_value_from(length_validator); end
end
# source://simple_form-5.1.0/lib/simple_form/components/min_max.rb:4
module SimpleForm::Components::MinMax
# source://simple_form-5.1.0/lib/simple_form/components/min_max.rb:5
def min_max(wrapper_options = T.unsafe(nil)); end
private
# source://simple_form-5.1.0/lib/simple_form/components/min_max.rb:40
def evaluate_numericality_validator_option(option); end
# source://simple_form-5.1.0/lib/simple_form/components/min_max.rb:36
def find_numericality_validator; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/components/min_max.rb:16
def integer?; end
# source://simple_form-5.1.0/lib/simple_form/components/min_max.rb:28
def maximum_value(validator_options); end
# source://simple_form-5.1.0/lib/simple_form/components/min_max.rb:20
def minimum_value(validator_options); end
end
# Needs to be enabled in order to do automatic lookups.
#
# source://simple_form-5.1.0/lib/simple_form/components/minlength.rb:5
module SimpleForm::Components::Minlength
# source://simple_form-5.1.0/lib/simple_form/components/minlength.rb:6
def minlength(wrapper_options = T.unsafe(nil)); end
private
# source://simple_form-5.1.0/lib/simple_form/components/minlength.rb:23
def find_length_validator; end
# source://simple_form-5.1.0/lib/simple_form/components/minlength.rb:13
def minimum_length_from_validation; end
# source://simple_form-5.1.0/lib/simple_form/components/minlength.rb:27
def minimum_length_value_from(length_validator); end
end
# Needs to be enabled in order to do automatic lookups.
#
# source://simple_form-5.1.0/lib/simple_form/components/pattern.rb:5
module SimpleForm::Components::Pattern
# source://simple_form-5.1.0/lib/simple_form/components/pattern.rb:6
def pattern(wrapper_options = T.unsafe(nil)); end
private
# source://simple_form-5.1.0/lib/simple_form/components/pattern.rb:26
def evaluate_format_validator_option(option); end
# source://simple_form-5.1.0/lib/simple_form/components/pattern.rb:22
def find_pattern_validator; end
# source://simple_form-5.1.0/lib/simple_form/components/pattern.rb:13
def pattern_source; end
end
# Needs to be enabled in order to do automatic lookups.
#
# source://simple_form-5.1.0/lib/simple_form/components/placeholders.rb:5
module SimpleForm::Components::Placeholders
# source://simple_form-5.1.0/lib/simple_form/components/placeholders.rb:6
def placeholder(wrapper_options = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/components/placeholders.rb:11
def placeholder_text(wrapper_options = T.unsafe(nil)); end
end
# Needs to be enabled in order to do automatic lookups.
#
# source://simple_form-5.1.0/lib/simple_form/components/readonly.rb:5
module SimpleForm::Components::Readonly
# source://simple_form-5.1.0/lib/simple_form/components/readonly.rb:6
def readonly(wrapper_options = T.unsafe(nil)); end
private
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/components/readonly.rb:16
def readonly_attribute?; end
end
# source://simple_form-5.1.0/lib/simple_form/error_notification.rb:3
class SimpleForm::ErrorNotification
# @return [ErrorNotification] a new instance of ErrorNotification
#
# source://simple_form-5.1.0/lib/simple_form/error_notification.rb:6
def initialize(builder, options); end
# source://simple_form-5.1.0/lib/simple_form/error_notification.rb:4
def object(*args, &block); end
# source://simple_form-5.1.0/lib/simple_form/error_notification.rb:4
def object_name(*args, &block); end
# source://simple_form-5.1.0/lib/simple_form/error_notification.rb:12
def render; end
# source://simple_form-5.1.0/lib/simple_form/error_notification.rb:4
def template(*args, &block); end
protected
# source://simple_form-5.1.0/lib/simple_form/error_notification.rb:28
def error_message; end
# source://simple_form-5.1.0/lib/simple_form/error_notification.rb:32
def error_notification_tag; end
# source://simple_form-5.1.0/lib/simple_form/error_notification.rb:20
def errors; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/error_notification.rb:24
def has_errors?; end
# source://simple_form-5.1.0/lib/simple_form/error_notification.rb:36
def html_options; end
# source://simple_form-5.1.0/lib/simple_form/error_notification.rb:41
def translate_error_notification; end
end
# source://simple_form-5.1.0/lib/simple_form.rb:41
SimpleForm::FILE_METHODS_DEPRECATION_WARN = T.let(T.unsafe(nil), String)
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:7
class SimpleForm::FormBuilder < ::ActionView::Helpers::FormBuilder
include ::SimpleForm::Inputs
extend ::SimpleForm::MapType
# @return [FormBuilder] a new instance of FormBuilder
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:41
def initialize(*_arg0); end
# Helper for dealing with association selects/radios, generating the
# collection automatically. It's just a wrapper to input, so all options
# supported in input are also supported by association. Some extra options
# can also be given:
#
# == Examples
#
# simple_form_for @user do |f|
# f.association :company # Company.all
# end
#
# f.association :company, collection: Company.all(order: 'name')
# # Same as using :order option, but overriding collection
#
# == Block
#
# When a block is given, association simple behaves as a proxy to
# simple_fields_for:
#
# f.association :company do |c|
# c.input :name
# c.input :type
# end
#
# From the options above, only :collection can also be supplied.
#
# Please note that the association helper is currently only tested with Active Record. Depending on the ORM you are using your mileage may vary.
#
# @raise [ArgumentError]
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:207
def association(association, options = T.unsafe(nil), &block); end
# Basic input helper, combines all components in the stack to generate
# input html based on options the user define and some guesses through
# database column information. By default a call to input will generate
# label + input + hint (when defined) + errors (when exists), and all can
# be configured inside a wrapper html.
#
# If a block is given, the contents of the block will replace the input
# field that would otherwise be generated automatically. The content will
# be given a label and wrapper div to make it consistent with the other
# elements in the form.
#
# == Examples
#
# # Imagine @user has error "can't be blank" on name
# simple_form_for @user do |f|
# f.input :name, hint: 'My hint'
# end
#
# This is the output html (only the input portion, not the form):
#
# <label class="string required" for="user_name">
# <abbr title="required">*</abbr> Super User Name!
# </label>
# <input class="string required" id="user_name" maxlength="100"
# name="user[name]" type="text" value="Carlos" />
# <span class="hint">My hint</span>
# <span class="error">can't be blank</span>
#
# Each database type will render a default input, based on some mappings and
# heuristic to determine which is the best option.
#
# You have some options for the input to enable/disable some functions:
#
# as: allows you to define the input type you want, for instance you
# can use it to generate a text field for a date column.
#
# required: defines whether this attribute is required or not. True
# by default.
#
# The fact SimpleForm is built in components allow the interface to be unified.
# So, for instance, if you need to disable :hint for a given input, you can pass
# hint: false. The same works for :error, :label and :wrapper.
#
# Besides the html for any component can be changed. So, if you want to change
# the label html you just need to give a hash to :label_html. To configure the
# input html, supply :input_html instead and so on.
#
# == Options
#
# Some inputs, as datetime, time and select allow you to give extra options, like
# prompt and/or include blank. Such options are given in plainly:
#
# f.input :created_at, include_blank: true
#
# == Collection
#
# When playing with collections (:radio_buttons, :check_boxes and :select
# inputs), you have three extra options:
#
# collection: use to determine the collection to generate the radio or select
#
# label_method: the method to apply on the array collection to get the label
#
# value_method: the method to apply on the array collection to get the value
#
# == Priority
#
# Some inputs, as :time_zone and :country accepts a :priority option. If none is
# given SimpleForm.time_zone_priority and SimpleForm.country_priority are used respectively.
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:118
def attribute(attribute_name, options = T.unsafe(nil), &block); end
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:237
def button(type, *args, &block); end
# Creates a button:
#
# form_for @user do |f|
# f.button :submit
# end
#
# It just acts as a proxy to method name given. We also alias original Rails
# button implementation (3.2 forward (to delegate to the original when
# calling `f.button :button`.
#
# source://actionview-5.2.8.1/lib/action_view/helpers/form_helper.rb:2244
def button_button(value = T.unsafe(nil), options = T.unsafe(nil), &block); end
# Creates a collection of check boxes for each item in the collection,
# associated with a clickable label. Use value_method and text_method to
# convert items in the collection for use as text/value in check boxes.
# You can give a symbol or a proc to both value_method and text_method,
# that will be evaluated for each item in the collection.
#
# == Examples
#
# form_for @user do |f|
# f.collection_check_boxes :options, [[true, 'Yes'] ,[false, 'No']], :first, :last
# end
#
# <input name="user[options][]" type="hidden" value="" />
# <input id="user_options_true" name="user[options][]" type="checkbox" value="true" />
# <label class="collection_check_boxes" for="user_options_true">Yes</label>
# <input name="user[options][]" type="hidden" value="" />
# <input id="user_options_false" name="user[options][]" type="checkbox" value="false" />
# <label class="collection_check_boxes" for="user_options_false">No</label>
#
# It is also possible to give a block that should generate the check box +
# label. To wrap the check box with the label, for instance:
#
# form_for @user do |f|
# f.collection_check_boxes(
# :options, [[true, 'Yes'] ,[false, 'No']], :first, :last
# ) do |b|
# b.label { b.check_box + b.text }
# end
# end
#
# == Options
#
# Collection check box accepts some extra options:
#
# * checked => the value or values that should be checked initially. Accepts
# a single item or an array of items. It overrides existing associations.
#
# * disabled => the value or values that should be disabled. Accepts a single
# item or an array of items.
#
# * collection_wrapper_tag => the tag to wrap the entire collection.
#
# * collection_wrapper_class => the CSS class to use for collection_wrapper_tag. This option
# is ignored if the :collection_wrapper_tag option is blank.
#
# * item_wrapper_tag => the tag to wrap each item in the collection.
#
# * item_wrapper_class => the CSS class to use for item_wrapper_tag
#
# * a block => to generate the label + check box or any other component.
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:451
def collection_check_boxes(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end
# Create a collection of radio inputs for the attribute. Basically this
# helper will create a radio input associated with a label for each
# text/value option in the collection, using value_method and text_method
# to convert these text/value. You can give a symbol or a proc to both
# value_method and text_method, that will be evaluated for each item in
# the collection.
#
# == Examples
#
# form_for @user do |f|
# f.collection_radio_buttons :options, [[true, 'Yes'] ,[false, 'No']], :first, :last
# end
#
# <input id="user_options_true" name="user[options]" type="radio" value="true" />
# <label class="collection_radio_buttons" for="user_options_true">Yes</label>
# <input id="user_options_false" name="user[options]" type="radio" value="false" />
# <label class="collection_radio_buttons" for="user_options_false">No</label>
#
# It is also possible to give a block that should generate the radio +
# label. To wrap the radio with the label, for instance:
#
# form_for @user do |f|
# f.collection_radio_buttons(
# :options, [[true, 'Yes'] ,[false, 'No']], :first, :last
# ) do |b|
# b.label { b.radio_button + b.text }
# end
# end
#
# == Options
#
# Collection radio accepts some extra options:
#
# * checked => the value that should be checked initially.
#
# * disabled => the value or values that should be disabled. Accepts a single
# item or an array of items.
#
# * collection_wrapper_tag => the tag to wrap the entire collection.
#
# * collection_wrapper_class => the CSS class to use for collection_wrapper_tag
#
# * item_wrapper_tag => the tag to wrap each item in the collection.
#
# * item_wrapper_class => the CSS class to use for item_wrapper_tag
#
# * a block => to generate the label + radio or any other component.
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:397
def collection_radio_buttons(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end
# Creates an error tag based on the given attribute, only when the attribute
# contains errors. All the given options are sent as :error_html.
#
# == Examples
#
# f.error :name
# f.error :name, id: "cool_error"
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:256
def error(attribute_name, options = T.unsafe(nil)); end
# Creates an error notification message that only appears when the form object
# has some error. You can give a specific message with the :message option,
# otherwise it will look for a message using I18n. All other options given are
# passed straight as html options to the html tag.
#
# == Examples
#
# f.error_notification
# f.error_notification message: 'Something went wrong'
# f.error_notification id: 'user_error_message', class: 'form_error'
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:346
def error_notification(options = T.unsafe(nil)); end
# Return the error but also considering its name. This is used
# when errors for a hidden field need to be shown.
#
# == Examples
#
# f.full_error :token #=> <span class="error">Token is invalid</span>
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:273
def full_error(attribute_name, options = T.unsafe(nil)); end
# Creates a hint tag for the given attribute. Accepts a symbol indicating
# an attribute for I18n lookup or a string. All the given options are sent
# as :hint_html.
#
# == Examples
#
# f.hint :name # Do I18n lookup
# f.hint :name, id: "cool_hint"
# f.hint "Don't forget to accept this"
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:295
def hint(attribute_name, options = T.unsafe(nil)); end
# Basic input helper, combines all components in the stack to generate
# input html based on options the user define and some guesses through
# database column information. By default a call to input will generate
# label + input + hint (when defined) + errors (when exists), and all can
# be configured inside a wrapper html.
#
# If a block is given, the contents of the block will replace the input
# field that would otherwise be generated automatically. The content will
# be given a label and wrapper div to make it consistent with the other
# elements in the form.
#
# == Examples
#
# # Imagine @user has error "can't be blank" on name
# simple_form_for @user do |f|
# f.input :name, hint: 'My hint'
# end
#
# This is the output html (only the input portion, not the form):
#
# <label class="string required" for="user_name">
# <abbr title="required">*</abbr> Super User Name!
# </label>
# <input class="string required" id="user_name" maxlength="100"
# name="user[name]" type="text" value="Carlos" />
# <span class="hint">My hint</span>
# <span class="error">can't be blank</span>
#
# Each database type will render a default input, based on some mappings and
# heuristic to determine which is the best option.
#
# You have some options for the input to enable/disable some functions:
#
# as: allows you to define the input type you want, for instance you
# can use it to generate a text field for a date column.
#
# required: defines whether this attribute is required or not. True
# by default.
#
# The fact SimpleForm is built in components allow the interface to be unified.
# So, for instance, if you need to disable :hint for a given input, you can pass
# hint: false. The same works for :error, :label and :wrapper.
#
# Besides the html for any component can be changed. So, if you want to change
# the label html you just need to give a hash to :label_html. To configure the
# input html, supply :input_html instead and so on.
#
# == Options
#
# Some inputs, as datetime, time and select allow you to give extra options, like
# prompt and/or include blank. Such options are given in plainly:
#
# f.input :created_at, include_blank: true
#
# == Collection
#
# When playing with collections (:radio_buttons, :check_boxes and :select
# inputs), you have three extra options:
#
# collection: use to determine the collection to generate the radio or select
#
# label_method: the method to apply on the array collection to get the label
#
# value_method: the method to apply on the array collection to get the value
#
# == Priority
#
# Some inputs, as :time_zone and :country accepts a :priority option. If none is
# given SimpleForm.time_zone_priority and SimpleForm.country_priority are used respectively.
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:118
def input(attribute_name, options = T.unsafe(nil), &block); end
# Creates a input tag for the given attribute. All the given options
# are sent as :input_html.
#
# == Examples
#
# simple_form_for @user do |f|
# f.input_field :name
# end
#
# This is the output html (only the input portion, not the form):
#
# <input class="string required" id="user_name" maxlength="100"
# name="user[name]" type="text" value="Carlos" />
#
# It also support validation classes once it is configured.
#
# # config/initializers/simple_form.rb
# SimpleForm.setup do |config|
# config.input_field_valid_class = 'is-valid'
# config.input_field_error_class = 'is-invalid'
# end
#
# simple_form_for @user do |f|
# f.input_field :name
# end
#
# When the validation happens, the input will be rendered with
# the class configured according to the validation:
#
# - when the input is valid:
#
# <input class="is-valid string required" id="user_name" value="Carlos" />
#
# - when the input is invalid:
#
# <input class="is-invalid string required" id="user_name" value="" />
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:165
def input_field(attribute_name, options = T.unsafe(nil)); end
# Creates a default label tag for the given attribute. You can give a label
# through the :label option or using i18n. All the given options are sent
# as :label_html.
#
# == Examples
#
# f.label :name # Do I18n lookup
# f.label :name, "Name" # Same behavior as Rails, do not add required tag
# f.label :name, label: "Name" # Same as above, but adds required tag
#
# f.label :name, required: false
# f.label :name, id: "cool_label"
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:324
def label(attribute_name, *args); end
# The action to be used in lookup.
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:474
def lookup_action; end
# Extract the model names from the object_name mess, ignoring numeric and
# explicit child indexes.
#
# Example:
#
# route[blocks_attributes][0][blocks_learning_object_attributes][1][foo_attributes]
# ["route", "blocks", "blocks_learning_object", "foo"]
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:463
def lookup_model_names; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:124
def mappings; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:136
def mappings=(val); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:132
def mappings?; end
# Returns the value of attribute object.
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:8
def object; end
# Returns the value of attribute object_name.
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:8
def object_name; end
# Returns the value of attribute template.
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:8
def template; end
# Returns the value of attribute wrapper.
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:8
def wrapper; end
private
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:673
def attempt_mapping(mapping, at); end
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:683
def attempt_mapping_with_custom_namespace(input_name); end
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:508
def build_association_attribute(reflection, association, options); end
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:693
def build_input_field_components(components); end
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:703
def build_input_field_options; end
# Attempt to guess the better input type given the defined options. By
# default always fallback to the user :as option, or to a :select when a
# collection is given.
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:545
def default_input_type(attribute_name, column, options); end
# If cache_discovery is enabled, use the class level cache that persists
# between requests, otherwise use the instance one.
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:656
def discovery_cache; end
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:485
def fetch_association_collection(reflection, options); end
# Internal: Try to discover whether an attribute corresponds to a file or not.
#
# Most upload Gems add some kind of attributes to the ActiveRecord's model they are included in.
# This method tries to guess if an attribute belongs to some of these Gems by checking the presence
# of their methods using `#respond_to?`.
#
# Note: This does not support multiple file upload inputs, as this is very application-specific.
#
# The order here was chosen based on the popularity of Gems:
#
# - `#{attribute_name}_attachment` - ActiveStorage >= `5.2` and Refile >= `0.2.0` <= `0.4.0`
# - `remote_#{attribute_name}_url` - Refile >= `0.3.0` and CarrierWave >= `0.2.2`
# - `#{attribute_name}_attacher` - Refile >= `0.4.0` and Shrine >= `0.9.0`
# - `#{attribute_name}_file_name` - Paperclip ~> `2.0` (added for backwards compatibility)
#
# Returns a Boolean.
#
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:592
def file_method?(attribute_name); end
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:608
def find_association_reflection(association); end
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:600
def find_attribute_column(attribute_name); end
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:570
def find_custom_type(attribute_name); end
# Find an input based on the attribute name.
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:531
def find_input(attribute_name, options = T.unsafe(nil), &block); end
# Attempts to find a mapping. It follows the following rules:
#
# 1) It tries to find a registered mapping, if succeeds:
# a) Try to find an alternative with the same name in the Object scope
# b) Or use the found mapping
# 2) If not, fallbacks to #{input_type}Input
# 3) If not, fallbacks to SimpleForm::Inputs::#{input_type}Input
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:621
def find_mapping(input_type); end
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:646
def find_wrapper(input_type, options); end
# Attempts to find a wrapper mapping. It follows the following rules:
#
# 1) It tries to find a wrapper for the current form
# 2) If not, it tries to find a config
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:638
def find_wrapper_mapping(input_type); end
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:664
def mapping_override(klass); end
class << self
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:37
def discovery_cache; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:106
def mappings; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:104
def mappings=(val); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:99
def mappings?; end
end
end
# When action is create or update, we still should use new and edit
#
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:11
SimpleForm::FormBuilder::ACTIONS = T.let(T.unsafe(nil), Hash)
# source://simple_form-5.1.0/lib/simple_form/form_builder.rb:16
SimpleForm::FormBuilder::ATTRIBUTE_COMPONENTS = T.let(T.unsafe(nil), Array)
# Helpers are made of several helpers that cannot be turned on automatically.
# For instance, disabled cannot be turned on automatically, it requires the
# user to explicitly pass the option disabled: true so it may work.
#
# source://simple_form-5.1.0/lib/simple_form/helpers.rb:6
module SimpleForm::Helpers; end
# source://simple_form-5.1.0/lib/simple_form/helpers/autofocus.rb:4
module SimpleForm::Helpers::Autofocus
private
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/helpers/autofocus.rb:7
def has_autofocus?; end
end
# source://simple_form-5.1.0/lib/simple_form/helpers/disabled.rb:4
module SimpleForm::Helpers::Disabled
private
# source://simple_form-5.1.0/lib/simple_form/helpers/disabled.rb:11
def disabled_class; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/helpers/disabled.rb:7
def has_disabled?; end
end
# source://simple_form-5.1.0/lib/simple_form/helpers/readonly.rb:4
module SimpleForm::Helpers::Readonly
private
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/helpers/readonly.rb:11
def has_readonly?; end
# source://simple_form-5.1.0/lib/simple_form/helpers/readonly.rb:7
def readonly_class; end
end
# source://simple_form-5.1.0/lib/simple_form/helpers/required.rb:4
module SimpleForm::Helpers::Required
private
# source://simple_form-5.1.0/lib/simple_form/helpers/required.rb:11
def calculate_required; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/helpers/required.rb:25
def required_by_default?; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/helpers/required.rb:21
def required_by_validators?; end
# Do not use has_required? because we want to add the class
# regardless of the required option.
#
# source://simple_form-5.1.0/lib/simple_form/helpers/required.rb:31
def required_class; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/helpers/required.rb:7
def required_field?; end
end
# source://simple_form-5.1.0/lib/simple_form/helpers/validators.rb:4
module SimpleForm::Helpers::Validators
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/helpers/validators.rb:5
def has_validators?; end
private
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/helpers/validators.rb:27
def action_validator_match?(validator); end
# source://simple_form-5.1.0/lib/simple_form/helpers/validators.rb:11
def attribute_validators; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/helpers/validators.rb:23
def conditional_validators?(validator); end
# source://simple_form-5.1.0/lib/simple_form/helpers/validators.rb:40
def find_validator(kind); end
# source://simple_form-5.1.0/lib/simple_form/helpers/validators.rb:15
def reflection_validators; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/helpers/validators.rb:19
def valid_validator?(validator); end
end
# source://simple_form-5.1.0/lib/simple_form/inputs.rb:3
module SimpleForm::Inputs
extend ::ActiveSupport::Autoload
end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:7
class SimpleForm::Inputs::Base
include ::ActionView::Helpers::CaptureHelper
include ::ActionView::Helpers::OutputSafetyHelper
include ::ActionView::Helpers::TagHelper
include ::ActionView::Helpers::TranslationHelper
include ::SimpleForm::Helpers::Autofocus
include ::SimpleForm::Helpers::Disabled
include ::SimpleForm::Helpers::Readonly
include ::SimpleForm::Helpers::Required
include ::SimpleForm::Helpers::Validators
include ::SimpleForm::Components::Errors
include ::SimpleForm::Components::Hints
include ::SimpleForm::Components::HTML5
include ::SimpleForm::Components::LabelInput
include ::SimpleForm::Components::Labels
include ::SimpleForm::Components::Maxlength
include ::SimpleForm::Components::Minlength
include ::SimpleForm::Components::MinMax
include ::SimpleForm::Components::Pattern
include ::SimpleForm::Components::Placeholders
include ::SimpleForm::Components::Readonly
extend ::SimpleForm::Components::Labels::ClassMethods
# @return [Base] a new instance of Base
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:54
def initialize(builder, attribute_name, column, input_type, options = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:94
def additional_classes; end
# Returns the value of attribute attribute_name.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:28
def attribute_name; end
# Returns the value of attribute column.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:28
def column; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:67
def debug_missing_translation; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:134
def debug_missing_translation=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:124
def default_options; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:136
def default_options=(val); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:132
def default_options?; end
# Returns the value of attribute html_classes.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:28
def html_classes; end
# @raise [NotImplementedError]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:86
def input(wrapper_options = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:98
def input_class; end
# Returns the value of attribute input_html_classes.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:28
def input_html_classes; end
# Returns the value of attribute input_html_options.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:28
def input_html_options; end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:90
def input_options; end
# Returns the value of attribute input_type.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:28
def input_type; end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:31
def lookup_action(*args, &block); end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:31
def lookup_model_names(*args, &block); end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:31
def object(*args, &block); end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:31
def object_name(*args, &block); end
# Returns the value of attribute options.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:28
def options; end
# Returns the value of attribute reflection.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:28
def reflection; end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:31
def template(*args, &block); end
private
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:110
def column_limit; end
# Add one for decimal point
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:115
def decimal_limit; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:119
def decimal_or_float?; end
# Retrieve options for the given namespace from the options hash
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:133
def html_options_for(namespace, css_classes); end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:227
def i18n_scope; end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:104
def limit; end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:192
def merge_wrapper_options(options, wrapper_options); end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:123
def nested_boolean_style?; end
# Find reflection name when available, otherwise use attribute
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:128
def reflection_or_attribute_name; end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:211
def set_input_classes(wrapper_options); end
# Lookup translations for the given namespace using I18n, based on object name,
# actual action and attribute name. Lookup priority as follows:
#
# simple_form.{namespace}.{model}.{action}.{attribute}
# simple_form.{namespace}.{model}.{attribute}
# simple_form.{namespace}.defaults.{attribute}
#
# Namespace is used for :labels and :hints.
#
# Model is the actual object name, for a @user object you'll have :user.
# Action is the action being rendered, usually :new or :edit.
# And attribute is the attribute itself, :name for example.
#
# The lookup for nested attributes is also done in a nested format using
# both model and nested object names, such as follow:
#
# simple_form.{namespace}.{model}.{nested}.{action}.{attribute}
# simple_form.{namespace}.{model}.{nested}.{attribute}
# simple_form.{namespace}.{nested}.{action}.{attribute}
# simple_form.{namespace}.{nested}.{attribute}
# simple_form.{namespace}.defaults.{attribute}
#
# Example:
#
# simple_form:
# labels:
# user:
# new:
# email: 'E-mail para efetuar o sign in.'
# edit:
# email: 'E-mail.'
#
# Take a look at our locale example file.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:174
def translate_from_namespace(namespace, default = T.unsafe(nil)); end
class << self
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:60
def debug_missing_translation; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/module/attribute_accessors.rb:127
def debug_missing_translation=(obj); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:106
def default_options; end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:104
def default_options=(val); end
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:99
def default_options?; end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:42
def disable(*keys); end
# source://simple_form-5.1.0/lib/simple_form/inputs/base.rb:36
def enable(*keys); end
end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/block_input.rb:4
class SimpleForm::Inputs::BlockInput < ::SimpleForm::Inputs::Base
# @return [BlockInput] a new instance of BlockInput
#
# source://simple_form-5.1.0/lib/simple_form/inputs/block_input.rb:5
def initialize(*args, &block); end
# source://simple_form-5.1.0/lib/simple_form/inputs/block_input.rb:10
def input(wrapper_options = T.unsafe(nil)); end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:4
class SimpleForm::Inputs::BooleanInput < ::SimpleForm::Inputs::Base
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:5
def input(wrapper_options = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:19
def label_input(wrapper_options = T.unsafe(nil)); end
private
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:40
def boolean_label_class; end
# Build a checkbox tag using default unchecked value. This allows us to
# reuse the method for nested boolean style, but with no unchecked value,
# which won't generate the hidden checkbox. This is the default functionality
# in Rails > 3.2.1, and is backported in SimpleForm AV helpers.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:48
def build_check_box(unchecked_value, options); end
# Build a checkbox without generating the hidden field. See
# #build_hidden_field_for_checkbox for more info.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:54
def build_check_box_without_hidden_field(options); end
# Create a hidden field for the current checkbox, so we can simulate Rails
# functionality with hidden + checkbox, but under a nested context, where
# we need the hidden field to be *outside* the label (otherwise it
# generates invalid html - html5 only).
#
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:62
def build_hidden_field_for_checkbox; end
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:95
def checked_value; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:91
def include_hidden?; end
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:75
def inline_label; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:71
def inline_label?; end
# Booleans are not required by default because in most of the cases
# it makes no sense marking them as required. The only exception is
# Terms of Use usually presented at most sites sign up screen.
#
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:87
def required_by_default?; end
# source://simple_form-5.1.0/lib/simple_form/inputs/boolean_input.rb:99
def unchecked_value; end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_check_boxes_input.rb:4
class SimpleForm::Inputs::CollectionCheckBoxesInput < ::SimpleForm::Inputs::CollectionRadioButtonsInput
protected
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_check_boxes_input.rb:13
def build_nested_boolean_style_item_tag(collection_builder); end
# Checkbox components do not use the required html tag.
# More info: https://github.com/heartcombo/simple_form/issues/340#issuecomment-2871956
#
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_check_boxes_input.rb:9
def has_required?; end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_check_boxes_input.rb:17
def item_wrapper_class; end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:4
class SimpleForm::Inputs::CollectionInput < ::SimpleForm::Inputs::Base
# @raise [NotImplementedError]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:17
def input(wrapper_options = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:22
def input_options; end
private
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:34
def collection; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:94
def collection_includes_basic_objects?(collection_classes); end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:90
def detect_collection_classes(some_collection = T.unsafe(nil)); end
# Detect the right method to find the label and value for a collection.
# If no label or value method are defined, will attempt to find them based
# on default label and value methods that can be configured through
# SimpleForm.collection_label_methods and
# SimpleForm.collection_value_methods.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:59
def detect_collection_methods; end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:71
def detect_common_display_methods(collection_classes = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:83
def detect_method_from_class(collection_classes); end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:41
def has_required?; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:50
def multiple?; end
# Check if :include_blank must be included by default.
#
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:46
def skip_include_blank?; end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:98
def translate_collection; end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:113
def translate_option(options, key); end
class << self
# Default boolean collection for use with selects/radios when no
# collection is given. Always fallback to this boolean collection.
# Texts can be translated using i18n in "simple_form.yes" and
# "simple_form.no" keys. See the example locale file.
#
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:12
def boolean_collection; end
end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_input.rb:5
SimpleForm::Inputs::CollectionInput::BASIC_OBJECT_CLASSES = T.let(T.unsafe(nil), Array)
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_radio_buttons_input.rb:4
class SimpleForm::Inputs::CollectionRadioButtonsInput < ::SimpleForm::Inputs::CollectionInput
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_radio_buttons_input.rb:5
def input(wrapper_options = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_radio_buttons_input.rb:17
def input_options; end
protected
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_radio_buttons_input.rb:25
def apply_default_collection_options!(options); end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_radio_buttons_input.rb:43
def build_nested_boolean_style_item_tag(collection_builder); end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_radio_buttons_input.rb:37
def collection_block_for_nested_boolean_style; end
# Do not attempt to generate label[for] attributes by default, unless an
# explicit html option is given. This avoids generating labels pointing to
# non existent fields.
#
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_radio_buttons_input.rb:54
def generate_label_for_attribute?; end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_radio_buttons_input.rb:47
def item_wrapper_class; end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_select_input.rb:4
class SimpleForm::Inputs::CollectionSelectInput < ::SimpleForm::Inputs::CollectionInput
# source://simple_form-5.1.0/lib/simple_form/inputs/collection_select_input.rb:5
def input(wrapper_options = T.unsafe(nil)); end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/color_input.rb:4
class SimpleForm::Inputs::ColorInput < ::SimpleForm::Inputs::Base
# source://simple_form-5.1.0/lib/simple_form/inputs/color_input.rb:5
def input(wrapper_options = T.unsafe(nil)); end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/date_time_input.rb:4
class SimpleForm::Inputs::DateTimeInput < ::SimpleForm::Inputs::Base
# source://simple_form-5.1.0/lib/simple_form/inputs/date_time_input.rb:5
def input(wrapper_options = T.unsafe(nil)); end
private
# source://simple_form-5.1.0/lib/simple_form/inputs/date_time_input.rb:17
def label_target; end
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/date_time_input.rb:34
def use_html5_inputs?; end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/file_input.rb:4
class SimpleForm::Inputs::FileInput < ::SimpleForm::Inputs::Base
# source://simple_form-5.1.0/lib/simple_form/inputs/file_input.rb:5
def input(wrapper_options = T.unsafe(nil)); end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/grouped_collection_select_input.rb:4
class SimpleForm::Inputs::GroupedCollectionSelectInput < ::SimpleForm::Inputs::CollectionInput
# source://simple_form-5.1.0/lib/simple_form/inputs/grouped_collection_select_input.rb:5
def input(wrapper_options = T.unsafe(nil)); end
private
# Sample collection
#
# source://simple_form-5.1.0/lib/simple_form/inputs/grouped_collection_select_input.rb:25
def collection; end
# source://simple_form-5.1.0/lib/simple_form/inputs/grouped_collection_select_input.rb:44
def detect_method_from_class(collection_classes); end
# source://simple_form-5.1.0/lib/simple_form/inputs/grouped_collection_select_input.rb:33
def group_label_method; end
# source://simple_form-5.1.0/lib/simple_form/inputs/grouped_collection_select_input.rb:29
def group_method; end
# source://simple_form-5.1.0/lib/simple_form/inputs/grouped_collection_select_input.rb:17
def grouped_collection; end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/hidden_input.rb:4
class SimpleForm::Inputs::HiddenInput < ::SimpleForm::Inputs::Base
# source://simple_form-5.1.0/lib/simple_form/inputs/hidden_input.rb:7
def input(wrapper_options = T.unsafe(nil)); end
private
# source://simple_form-5.1.0/lib/simple_form/inputs/hidden_input.rb:15
def required_class; end
class << self
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:106
def default_options; end
end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/numeric_input.rb:4
class SimpleForm::Inputs::NumericInput < ::SimpleForm::Inputs::Base
# source://simple_form-5.1.0/lib/simple_form/inputs/numeric_input.rb:7
def input(wrapper_options = T.unsafe(nil)); end
class << self
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:106
def default_options; end
end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/password_input.rb:4
class SimpleForm::Inputs::PasswordInput < ::SimpleForm::Inputs::Base
# source://simple_form-5.1.0/lib/simple_form/inputs/password_input.rb:7
def input(wrapper_options = T.unsafe(nil)); end
class << self
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:106
def default_options; end
end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/priority_input.rb:4
class SimpleForm::Inputs::PriorityInput < ::SimpleForm::Inputs::CollectionSelectInput
# source://simple_form-5.1.0/lib/simple_form/inputs/priority_input.rb:5
def input(wrapper_options = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/inputs/priority_input.rb:12
def input_priority; end
protected
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/priority_input.rb:18
def skip_include_blank?; end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/range_input.rb:4
class SimpleForm::Inputs::RangeInput < ::SimpleForm::Inputs::NumericInput
# source://simple_form-5.1.0/lib/simple_form/inputs/range_input.rb:5
def input(wrapper_options = T.unsafe(nil)); end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/rich_text_area_input.rb:4
class SimpleForm::Inputs::RichTextAreaInput < ::SimpleForm::Inputs::Base
# source://simple_form-5.1.0/lib/simple_form/inputs/rich_text_area_input.rb:5
def input(wrapper_options = T.unsafe(nil)); end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/string_input.rb:4
class SimpleForm::Inputs::StringInput < ::SimpleForm::Inputs::Base
# source://simple_form-5.1.0/lib/simple_form/inputs/string_input.rb:7
def input(wrapper_options = T.unsafe(nil)); end
private
# @return [Boolean]
#
# source://simple_form-5.1.0/lib/simple_form/inputs/string_input.rb:20
def string?; end
class << self
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:106
def default_options; end
end
end
# source://simple_form-5.1.0/lib/simple_form/inputs/text_input.rb:4
class SimpleForm::Inputs::TextInput < ::SimpleForm::Inputs::Base
# source://simple_form-5.1.0/lib/simple_form/inputs/text_input.rb:7
def input(wrapper_options = T.unsafe(nil)); end
class << self
# source://activesupport-5.2.8.1/lib/active_support/core_ext/class/attribute.rb:106
def default_options; end
end
end
# source://simple_form-5.1.0/lib/simple_form/map_type.rb:5
module SimpleForm::MapType
# @raise [ArgumentError]
#
# source://simple_form-5.1.0/lib/simple_form/map_type.rb:11
def map_type(*types); end
class << self
# @private
#
# source://simple_form-5.1.0/lib/simple_form/map_type.rb:6
def extended(base); end
end
end
# source://simple_form-5.1.0/lib/simple_form/railtie.rb:5
class SimpleForm::Railtie < ::Rails::Railtie; end
# source://simple_form-5.1.0/lib/simple_form/tags.rb:3
module SimpleForm::Tags; end
# source://simple_form-5.1.0/lib/simple_form/tags.rb:57
class SimpleForm::Tags::CollectionCheckBoxes < ::ActionView::Helpers::Tags::CollectionCheckBoxes
include ::SimpleForm::Tags::CollectionExtensions
# source://simple_form-5.1.0/lib/simple_form/tags.rb:60
def render; end
private
# source://simple_form-5.1.0/lib/simple_form/tags.rb:66
def render_component(builder); end
end
# source://simple_form-5.1.0/lib/simple_form/tags.rb:4
module SimpleForm::Tags::CollectionExtensions
private
# source://simple_form-5.1.0/lib/simple_form/tags.rb:7
def render_collection; end
# source://simple_form-5.1.0/lib/simple_form/tags.rb:29
def wrap_rendered_collection(collection); end
end
# source://simple_form-5.1.0/lib/simple_form/tags.rb:41
class SimpleForm::Tags::CollectionRadioButtons < ::ActionView::Helpers::Tags::CollectionRadioButtons
include ::SimpleForm::Tags::CollectionExtensions
# source://simple_form-5.1.0/lib/simple_form/tags.rb:44
def render; end
private
# source://simple_form-5.1.0/lib/simple_form/tags.rb:50
def render_component(builder); end
end
# Raised when fails to find a given wrapper name
#
# source://simple_form-5.1.0/lib/simple_form.rb:222
class SimpleForm::WrapperNotFound < ::StandardError; end
# source://simple_form-5.1.0/lib/simple_form/wrappers.rb:3
module SimpleForm::Wrappers; end
# Provides the builder syntax for components. The builder provides
# three methods `use`, `optional` and `wrapper` and they allow the following invocations:
#
# config.wrappers do |b|
# # Use a single component
# b.use :html5
#
# # Use the component, but do not automatically lookup. It will only be triggered when
# # :placeholder is explicitly set.
# b.optional :placeholder
#
# # Use a component with specific wrapper options
# b.use :error, wrap_with: { tag: "span", class: "error" }
#
# # Use a set of components by wrapping them in a tag+class.
# b.wrapper tag: "div", class: "another" do |ba|
# ba.use :label
# ba.use :input
# end
#
# # Use a set of components by wrapping them in a tag+class.
# # This wrapper is identified by :label_input, which means it can
# # be turned off on demand with `f.input :name, label_input: false`
# b.wrapper :label_input, tag: "div", class: "another" do |ba|
# ba.use :label
# ba.use :input
# end
# end
#
# The builder also accepts default options at the root level. This is usually
# used if you want a component to be disabled by default:
#
# config.wrappers hint: false do |b|
# b.use :hint
# b.use :label_input
# end
#
# In the example above, hint defaults to false, which means it won't automatically
# do the lookup anymore. It will only be triggered when :hint is explicitly set.
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/builder.rb:43
class SimpleForm::Wrappers::Builder
# @return [Builder] a new instance of Builder
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/builder.rb:44
def initialize(options); end
# source://simple_form-5.1.0/lib/simple_form/wrappers/builder.rb:57
def optional(name, options = T.unsafe(nil), &block); end
# source://simple_form-5.1.0/lib/simple_form/wrappers/builder.rb:75
def to_a; end
# source://simple_form-5.1.0/lib/simple_form/wrappers/builder.rb:49
def use(name, options = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/wrappers/builder.rb:62
def wrapper(name, options = T.unsafe(nil)); end
end
# source://simple_form-5.1.0/lib/simple_form/wrappers/leaf.rb:4
class SimpleForm::Wrappers::Leaf
# @return [Leaf] a new instance of Leaf
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/leaf.rb:7
def initialize(namespace, options = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/wrappers/leaf.rb:24
def find(name); end
# Returns the value of attribute namespace.
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/leaf.rb:5
def namespace; end
# source://simple_form-5.1.0/lib/simple_form/wrappers/leaf.rb:12
def render(input); end
end
# A wrapper is an object that holds several components and render them.
# A component may be any object that responds to `render`.
# This API allows inputs/components to be easily wrapped, removing the
# need to modify the code only to wrap input in an extra tag.
#
# `Many` represents a wrapper around several components at the same time.
# It may optionally receive a namespace, allowing it to be configured
# on demand on input generation.
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/many.rb:12
class SimpleForm::Wrappers::Many
# @return [Many] a new instance of Many
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/many.rb:15
def initialize(namespace, components, defaults = T.unsafe(nil)); end
# Returns the value of attribute components.
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/many.rb:13
def components; end
# Returns the value of attribute defaults.
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/many.rb:13
def defaults; end
# source://simple_form-5.1.0/lib/simple_form/wrappers/many.rb:36
def find(name); end
# Returns the value of attribute namespace.
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/many.rb:13
def namespace; end
# source://simple_form-5.1.0/lib/simple_form/wrappers/many.rb:23
def render(input); end
private
# source://simple_form-5.1.0/lib/simple_form/wrappers/many.rb:69
def html_classes(input, options); end
# source://simple_form-5.1.0/lib/simple_form/wrappers/many.rb:65
def html_options(options); end
# source://simple_form-5.1.0/lib/simple_form/wrappers/many.rb:52
def wrap(input, options, content); end
end
# `Root` is the root wrapper for all components. It is special cased to
# always have a namespace and to add special html classes.
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/root.rb:6
class SimpleForm::Wrappers::Root < ::SimpleForm::Wrappers::Many
# @return [Root] a new instance of Root
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/root.rb:9
def initialize(*args); end
# Provide a fallback if name cannot be found.
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/root.rb:20
def find(name); end
# Returns the value of attribute options.
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/root.rb:7
def options; end
# source://simple_form-5.1.0/lib/simple_form/wrappers/root.rb:14
def render(input); end
private
# source://simple_form-5.1.0/lib/simple_form/wrappers/root.rb:37
def html_class(key, options); end
# source://simple_form-5.1.0/lib/simple_form/wrappers/root.rb:26
def html_classes(input, options); end
end
# `Single` is an optimization for a wrapper that has only one component.
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/single.rb:5
class SimpleForm::Wrappers::Single < ::SimpleForm::Wrappers::Many
# @return [Single] a new instance of Single
#
# source://simple_form-5.1.0/lib/simple_form/wrappers/single.rb:6
def initialize(name, wrapper_options = T.unsafe(nil), options = T.unsafe(nil)); end
# source://simple_form-5.1.0/lib/simple_form/wrappers/single.rb:12
def render(input); end
private
# source://simple_form-5.1.0/lib/simple_form/wrappers/single.rb:22
def html_options(options); end
end