table-for 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
data/lib/table-for.rb CHANGED
@@ -1,13 +1,3 @@
1
- require "action_view"
2
-
3
- $LOAD_PATH.unshift(File.dirname(__FILE__))
4
-
5
1
  require "table_for/table_for"
6
2
  require "table_for/helper_methods"
7
- require "table_for/engine"
8
-
9
- $LOAD_PATH.shift
10
-
11
- if defined?(ActionView::Base)
12
- ActionView::Base.send :include, TableFor::HelperMethods
13
- end
3
+ require "table_for/engine"
@@ -1,5 +1,12 @@
1
+ require "table-for"
2
+ require "rails"
3
+
1
4
  module TableFor
2
5
  class Engine < Rails::Engine
3
-
6
+ initializer "table_for.initialize_helpers" do
7
+ ActiveSupport.on_load(:action_view) do
8
+ include TableFor::HelperMethods
9
+ end
10
+ end
4
11
  end
5
12
  end
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: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Hunter