list_controls 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
data/README
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
module
|
2
|
-
module
|
1
|
+
module ListControls
|
2
|
+
module ActionController
|
3
3
|
|
4
4
|
def self.included(base)
|
5
5
|
base.extend(ClassMethods)
|
6
6
|
end
|
7
7
|
|
8
8
|
module ClassMethods
|
9
|
-
def
|
10
|
-
include
|
9
|
+
def enable_list_controls(options = {})
|
10
|
+
include ::ListControls::ActionController::InstanceMethods
|
11
11
|
|
12
12
|
attr_reader :filters
|
13
13
|
|
14
|
-
before_filter :
|
14
|
+
before_filter :assign_filters
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -23,7 +23,7 @@ module ActionController
|
|
23
23
|
{}
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
26
|
+
def assign_filters
|
27
27
|
session[:list_controls]||= {}
|
28
28
|
|
29
29
|
session_store = session[:list_controls][self.class.to_s]||= {}
|
@@ -39,4 +39,4 @@ module ActionController
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
::ActionController::Base.send(:include,
|
42
|
+
::ActionController::Base.send(:include, ::ListControls::ActionController)
|
File without changes
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: list_controls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Laurynas Butkus
|
@@ -41,8 +41,9 @@ extensions: []
|
|
41
41
|
extra_rdoc_files: []
|
42
42
|
|
43
43
|
files:
|
44
|
-
- lib/
|
45
|
-
- lib/
|
44
|
+
- lib/list_controls.rb
|
45
|
+
- lib/list_controls/action_controller.rb
|
46
|
+
- lib/list_controls/rails_helpers.rb
|
46
47
|
- README
|
47
48
|
- MIT-LICENSE
|
48
49
|
- Rakefile
|