Skip to content

Instantly share code, notes, and snippets.

@jordanisip
Created August 15, 2009 00:04
Show Gist options
  • Save jordanisip/168166 to your computer and use it in GitHub Desktop.
Save jordanisip/168166 to your computer and use it in GitHub Desktop.
module Ramaze
module Helper
module Grid
LOOKUP << self
def grid_unit options={}, &block
haml_tag :div, {:id => options[:id], :class => "yui-u#{ ' first' if options[:first] }"} do
block.call
end
end
end
end
end
# Using Haml inside view
- grid_unit do
this is inside
# returns
<div class="yui-u">this is inside</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment