Method: BaseHelper#rounded

Defined in:
app/helpers/base_helper.rb

#rounded(options = {}) {|content| ... } ⇒ Object

Yields:

  • (content)


28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'app/helpers/base_helper.rb', line 28

def rounded(options={}, &content)
  options = {:class=>"box"}.merge(options)
  options[:class] = "box " << options[:class] if options[:class]!="box"

  str = '<div'
  options.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