Module: Opensteam::Helpers::ConfigTableHelper::HelperMethods

Defined in:
lib/opensteam/helpers/config_table_helper.rb

Instance Method Summary collapse

Instance Method Details

#osteam_sort_table(mdl, opts = {}, &block) ⇒ Object



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/opensteam/helpers/config_table_helper.rb', line 123

def osteam_sort_table( mdl, opts = {}, &block )
  mdl = mdl.to_s.classify.constantize unless mdl.is_a?( Class )
  config_table = mdl.osteam_configtable
  
  content = capture( config_table, &block )

  html_options = opts[:html] || {}
  
  concat( 
    ( :div, { :class => 'osteam_configured_table_div' } ) do
      ( :table, html_options ) do
        content
      end
    end, block.binding )
  
end