Class: ODDB::Html::View::Drugs::ProductsComposite

Inherits:
HtmlGrid::DivComposite
  • Object
show all
Defined in:
lib/oddb/html/view/drugs/products.rb

Constant Summary collapse

COMPONENTS =
{
  [0,0] => InlineSearch, 
  [0,1] => :products, 
}
CSS_ID_MAP =
['result-search']
CSS_MAP =
{ 1 => 'result' }

Instance Method Summary collapse

Instance Method Details

#products(model) ⇒ Object



86
87
88
89
# File 'lib/oddb/html/view/drugs/products.rb', line 86

def products(model)
  offset = [@session.user_input(:offset).to_i, model.size].min
  ProductsList.new(model[offset, @session.pagelength], @session, self)
end