Skip to content

Instantly share code, notes, and snippets.

View Johnius's full-sized avatar

John Luke Johnius

  • AppDynamics
  • San Francisco Bay Area
  • 14:55 (UTC -08:00)
View GitHub Profile
# app/views/modules/shared/feedback.rb:
b :layout
e :feedback do
b :feedback, :form, action: action, method: 'POST', accept-charset: 'UTF-8', novalidate: 'novalidate', id: id do
e :input do |input|
m input.type
e :input, type: input.type, placeholder: input.placeholder
@Johnius
Johnius / gist:f4b3dbf7d01d10382ef5
Last active August 29, 2015 14:08
BEM true-way for Haml
/views/blocks/header.haml
- b 'header', attrs: { title: "Header title" } do |b|
- e 'title', tag: 'h1', content: 'Title example'
- e 'subtitle', tag: 'h3', content: 'Subtitle here'
/views/index.haml
= b 'header'