-
Notifications
You must be signed in to change notification settings - Fork 177
Form Fields
Bartek Fijałkowski edited this page Feb 3, 2021
·
25 revisions
text_field :caption
(With bonus enum handling)
resource_states = Resource.states.keys.map { |state| [state.humanize, state] }
select :state, resource_states
static_field :updated_at, resource.updated_at
check_box :is_true?
email_field :email
telephone_field :mobile
collection_check_boxes :resource_ids, Resource.all, :id, :name
collection_radio_buttons :resource_id, Resource.all, :id, :name