Basic site flow improvements and devise handling
This commit is contained in:
@@ -11,5 +11,13 @@ class CustomFormBuilder < ActionView::Helpers::FormBuilder
|
||||
)
|
||||
t.content_tag(:div, elements.inject(&:+), class: 'form-actions')
|
||||
end
|
||||
def row(attribute, options={}, &block)
|
||||
t = @template
|
||||
classes = []
|
||||
classes << 'form-row'
|
||||
classes << attribute
|
||||
classes << 'error' if object.errors[attribute].present?
|
||||
t.content_tag(:div, t.capture(&block), class: classes)
|
||||
end
|
||||
end
|
||||
ActionView::Base.default_form_builder = CustomFormBuilder
|
||||
|
||||
Reference in New Issue
Block a user