Class: AnchormodelInput

Inherits:
SimpleForm::Inputs::CollectionSelectInput
  • Object
show all
Includes:
Anchormodel::SimpleFormInputs::Helpers::AnchormodelInputsCommon
Defined in:
lib/anchormodel/simple_form_inputs/anchormodel_input.rb

Overview

SimpleForm input for an anchormodel attribute. Renders a <select> collection whose options are the entries of the bound anchormodel.

Auto-detected by SimpleForm because the attribute's AR type is :anchormodel.

Examples:

<%= simple_form_for user do |f| %>
  <%= f.input :role %>
<% end %>

Method Summary

Methods included from Anchormodel::SimpleFormInputs::Helpers::AnchormodelInputsCommon

#input