Skip to content
Bartek Fijałkowski edited this page Feb 3, 2021 · 25 revisions

Text Field

text_field :caption

Select Field

(With bonus enum handling)

resource_states = Resource.states.keys.map { |state| [state.humanize, state] }
select :state, resource_states

Static Field

static_field :updated_at, resource.updated_at

CheckBox Field

check_box :is_true?

Email Field

email_field :email

Telephone Field

telephone_field :mobile

Collection CheckBoxes

collection_check_boxes :resource_ids, Resource.all, :id, :name