table-for 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
data/lib/table-for.rb CHANGED
@@ -1,3 +1,2 @@
1
1
  require "table_for/table_for"
2
- require "table_for/helper_methods"
3
2
  require "table_for/engine"
@@ -1,4 +1,3 @@
1
- require "table-for"
2
1
  require "rails"
3
2
 
4
3
  module TableFor
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table-for
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Hunter
@@ -104,7 +104,6 @@ files:
104
104
  - VERSION
105
105
  - lib/table-for.rb
106
106
  - lib/table_for/engine.rb
107
- - lib/table_for/helper_methods.rb
108
107
  - lib/table_for/table_for.rb
109
108
  - rails/init.rb
110
109
  has_rdoc: true
@@ -1,22 +0,0 @@
1
- module TableFor
2
- module HelperMethods
3
- def table_for_options(options={}, parameters={})
4
- evaluated_options = {}
5
- options.each_pair { |k, v| evaluated_options[k] = (v.is_a?(Proc) ? v.call(parameters) : v)}
6
- evaluated_options
7
- end
8
-
9
- def table_for(records, options={}, &block)
10
- options[:view] = self
11
- options[:records] = records
12
- options[:block] = block
13
- options[:row_html] = {:class => lambda { |parameters| cycle('odd', 'even')}} if options[:row_html].nil?
14
- options[:template] = "table_for/table_for"
15
- options[:templates_folder] = "table_for"
16
- options[:record_variable] = "records"
17
- options[:variable] = "table"
18
-
19
- TableFor::Base.new(options).render
20
- end
21
- end
22
- end