Summary

GitHub
Manual

Common Scenarios

Drop down lists with associated models
The implementation of dropdown lists in Simple Form leverages the collection feature. Here are the changes that I made in my related model, controller and view

Model

class Stuff < ApplicationRecord
  belongs_to :user, required: false
  has_one :category
end

Controller

  # GET /stuffs/new
  def new
    @stuff = Stuff.new
    @categories = Category.all
  end

View

<%= f.input :category_id, as: :select, collection: @categories %>

Overriding the default id

There are two common ways of overriding the default css id in Simple Form. The first way is just to assign it to an id

<%= f.input :category_name, id: 'category_name' %>

The other way is to override it with input_html

<%= f.input :bunch, collection: @bunches, input_html: { id: 'my_bunches_dropdown'} %>