active-list 4.1.2 → 4.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.1.2
1
+ 4.1.3
@@ -63,11 +63,11 @@ module ActiveList
63
63
  code += "options = (params||{}).merge(options)\n"
64
64
  # Session values
65
65
  code += "session[:list] = {} unless session[:list].is_a? Hash\n"
66
- code += "session[:list][:#{self.view_method_name}] = {} unless session[:list][:#{self.view_method_name}].is_a? Hash\n"
66
+ code += "session[:list][:#{self.view_method_name}] = {} unless session[:list][:#{self.view_method_name}].is_a? Hash\n"
67
67
  code += "list_params = session[:list][:#{self.view_method_name}]\n"
68
68
  code += "list_params[:hidden_columns] = [] unless list_params[:hidden_columns].is_a? Array\n"
69
69
  for parameter, convertor in @parameters.sort{|a,b| a[0].to_s <=> b[0].to_s}
70
- expr = "options['#{self.name}_#{parameter}'] || options['#{parameter}'] || list_params[:#{parameter}]"
70
+ expr = "options.delete('#{self.name}_#{parameter}') || options.delete('#{parameter}') || list_params[:#{parameter}]"
71
71
  expr += " || #{@options[parameter]}" unless @options[parameter].blank?
72
72
  code += "list_params[:#{parameter}] = (#{expr}).#{convertor}\n"
73
73
  end
@@ -68,7 +68,7 @@ module ActiveList
68
68
  code << "return tbody.html_safe if options[:only] == 'body' or options[:only] == 'tbody'\n"
69
69
 
70
70
  code << "html = ''\n"
71
- code << "html << '<div id=\"#{table.name}\" data-list-source=\"'+h(url_for({:action => '#{table.controller_method_name}'}))+'\" class=\"active-list\""
71
+ code << "html << '<div id=\"#{table.name}\" data-list-source=\"'+h(url_for(options.merge(:action => '#{table.controller_method_name}')))+'\" class=\"active-list\""
72
72
  code << " data-list-current-page=\"' + #{table.records_variable_name}_page.to_s + '\" data-list-page-size=\"' + #{table.records_variable_name}_limit.to_s + '\""
73
73
  code << " data-list-sort-by=\"' + list_params[:sort].to_s + '\" data-list-sort-dir=\"' + list_params[:dir].to_s + '\""
74
74
  code << ">'\n"
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: active-list
3
3
  version: !ruby/object:Gem::Version
4
4
  version: !binary |-
5
- NC4xLjI=
5
+ NC4xLjM=
6
6
  prerelease:
7
7
  platform: ruby
8
8
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-07-24 00:00:00.000000000 Z
13
+ date: 2012-07-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails