Skip to content

vladson/role_block_haml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Role Block Haml

Role Block Haml - is a gem, that adds some awesome shortcuts for data-role and data-block attributes to Haml parser. Especially useful when combined with Evil Blocks by Andrey Sitnik.

This version is for HAML v4.

Usage

@@todo
  %span@linker
  @actor

Is converted into:

<div data-block="todo">
    <span data-role="linker"></span>
    <div data-role="actor"></div>
</div>

Install

Ruby on Rails

Add role_block_haml gem to Gemfile:

gem "role_block_haml"

Ruby

Change HAML parser to support shortcuts:

RoleBlockHaml.install_to_haml!

About

data role and data-block haml shortcuts

Resources

License

Stars

Watchers

Forks

Packages

No packages published