Sha256: f2809f2086c3303cb809ce95a89bcd52945edfe54a1219a1007a270abf9116ce
Contents?: true
Size: 780 Bytes
Versions: 12
Compression:
Stored size: 780 Bytes
Contents
module ViewMixins module Table def table_for(settings) #settings render :partial => '/helpers/build_table', :layout => false, :locals => {:settings => settings} end ## # Selected values from custom filter, it checks params and session ## def selected_values(form_id, path, default = []) par = params path.each do |p| break if par.blank? par = par[p.to_s] end selected = par unless par.blank? if selected.blank? par = session[form_id+"_params"] path.each do |p| break if par.blank? par = par[p.to_s] unless par[p.to_s].blank? end selected = par end selected = selected.blank? ? default : selected selected end end end
Version data entries
12 entries across 12 versions & 1 rubygems