Skip to content

Instantly share code, notes, and snippets.

View thaleshcv's full-sized avatar

thaleshcv thaleshcv

  • Fortaleza, Brasil
View GitHub Profile
@thaleshcv
thaleshcv / _form.html.haml
Created August 12, 2021 01:24 — forked from ftes/_form.html.haml
simple_form initializer for Bulma (input, select, checkbox)
-# Example form
= simple_form_for @some_model do |f|
-# Show error notification at top (general error text)
= f.error_notification
-# Show base errors at top
= f.error_notification message: (f.error :base) if f.object.errors[:base].present?
-# Regular input
= f.input :name, autofocus: true
-# Select input referencing other model