Sha256: db8f4921102333ce43a6275f310bcc87a4917c783c69cfee5c96f5f01d1669fc

Contents?: true

Size: 397 Bytes

Versions: 3

Compression:

Stored size: 397 Bytes

Contents

module MdwaHelper
  
  def pagination_footer( object_list )
    html = []
    html.push '<div id="pagination">'
    html.push will_paginate object_list
    html.push '</div></div>'
    
    return html.join('').html_safe
  end

  def encode_results_to_autocomplete(results, field_name)
    return results.collect{ |c| "{label: '#{c.send field_name}', value: '#{c.id}'}"  }.join( ',' )
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mdd-3.0.2 app/helpers/mdwa_helper.rb
mdd-3.0.1 app/helpers/mdwa_helper.rb
mdd-3.0.0 app/helpers/mdwa_helper.rb