Method: BaseHelper#rounded
- Defined in:
- app/helpers/base_helper.rb
#rounded(options = {}) {|content| ... } ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'app/helpers/base_helper.rb', line 28 def rounded(={}, &content) = {:class=>"box"}.merge() [:class] = "box " << [:class] if [:class]!="box" str = '<div' .collect {|key,val| str << " #{key}=\"#{val}\"" } str << '><div class="box_top"></div>' str << "\n" concat(str.html_safe) yield(content) concat('<br class="clear" /><div class="box_bottom"></div></div>'.html_safe) end |