objectreload-roles 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/roles.rb +9 -0
- metadata +10 -9
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/roles.rb
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
require 'role'
|
2
|
+
|
3
|
+
if Role.table_exists?
|
4
|
+
require 'action_filters'
|
5
|
+
ActiveRecord::Base.send(:include, ActiveRecord::Aggregations::HasRoles)
|
6
|
+
ActionController::Base.send(:extend, Roles::ActionFilters)
|
7
|
+
else
|
8
|
+
ActiveRecord::Base.class_eval { def self.has_roles; end }
|
9
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: objectreload-roles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mateusz Drozdzynski
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-21 00:00:00 +
|
12
|
+
date: 2009-12-21 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -32,6 +32,7 @@ files:
|
|
32
32
|
- lib/action_filters.rb
|
33
33
|
- lib/active_record/aggregations/has_roles.rb
|
34
34
|
- lib/role.rb
|
35
|
+
- lib/roles.rb
|
35
36
|
- tasks/roles_tasks.rake
|
36
37
|
- test/blueprints.rb
|
37
38
|
- test/config/boot.rb
|
@@ -74,13 +75,13 @@ signing_key:
|
|
74
75
|
specification_version: 3
|
75
76
|
summary: Simple way to create roles for users.
|
76
77
|
test_files:
|
77
|
-
- test/
|
78
|
-
- test/
|
79
|
-
- test/config/environment.rb
|
80
|
-
- test/config/environments/test.rb
|
81
|
-
- test/config/routes.rb
|
78
|
+
- test/schema.rb
|
79
|
+
- test/user_test.rb
|
82
80
|
- test/models/user.rb
|
83
81
|
- test/role_test.rb
|
84
|
-
- test/
|
82
|
+
- test/blueprints.rb
|
85
83
|
- test/test_helper.rb
|
86
|
-
- test/
|
84
|
+
- test/config/environments/test.rb
|
85
|
+
- test/config/boot.rb
|
86
|
+
- test/config/routes.rb
|
87
|
+
- test/config/environment.rb
|