activeadmin-cancan 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -34,7 +34,7 @@ If the user authorization fails, a <tt>CanCan::AccessDenied</tt> exception will
34
34
 
35
35
  def current_ability
36
36
  @current_ability ||= Ability.new(current_admin_user)
37
- end
37
+ end
38
38
  end
39
39
 
40
40
  See CanCan page [https://github.com/ryanb/cancan/wiki/exception-handling] for more information.
@@ -8,7 +8,7 @@ ActiveAdmin::Namespace.class_eval do
8
8
  register_resource_controller(config)
9
9
  resource_dsl.prepare_menu(config)
10
10
  config = old_register(resource_class, options, &block)
11
- config.controller.authorize_resource
11
+ config.controller.load_and_authorize_resource
12
12
  config
13
13
  end
14
14
  end
@@ -22,3 +22,11 @@ ActiveAdmin::DSL.class_eval do
22
22
  end
23
23
  end
24
24
  end
25
+
26
+ CanCan::ControllerResource.class_eval do
27
+ def collection_instance=(instance)
28
+ end
29
+
30
+ def resource_instance=(instance)
31
+ end
32
+ end
@@ -1,3 +1,3 @@
1
1
  module ActiveadminCancan
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -0,0 +1,9 @@
1
+ development:
2
+ adapter: sqlite3
3
+ database: db/development.sqlite3
4
+ test:
5
+ adapter: sqlite3
6
+ database: db/test.sqlite3
7
+ production:
8
+ adapter: sqlite3
9
+ database: db/production.sqlite3
@@ -192,3 +192,11 @@
192
192
   (0.1ms) rollback transaction
193
193
   (0.1ms) begin transaction
194
194
   (0.1ms) rollback transaction
195
+  (0.5ms) begin transaction
196
+  (0.1ms) rollback transaction
197
+  (0.1ms) begin transaction
198
+  (0.1ms) rollback transaction
199
+  (0.4ms) begin transaction
200
+  (0.1ms) rollback transaction
201
+  (0.0ms) begin transaction
202
+  (0.1ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-cancan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-01 00:00:00.000000000Z
12
+ date: 2012-05-14 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70325817408620 !ruby/object:Gem::Requirement
16
+ requirement: &70366631082800 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70325817408620
24
+ version_requirements: *70366631082800
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: cancan
27
- requirement: &70325817408120 !ruby/object:Gem::Requirement
27
+ requirement: &70366631081600 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.6.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70325817408120
35
+ version_requirements: *70366631081600
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: activeadmin
38
- requirement: &70325817407660 !ruby/object:Gem::Requirement
38
+ requirement: &70366631080100 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,18 @@ dependencies:
43
43
  version: 0.4.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70325817407660
46
+ version_requirements: *70366631080100
47
+ - !ruby/object:Gem::Dependency
48
+ name: sqlite3
49
+ requirement: &70366631079060 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70366631079060
47
58
  description: Provides CanCan roles to ActiveAdmin
48
59
  email:
49
60
  - laurent@11factory.fr
@@ -80,6 +91,7 @@ files:
80
91
  - test/dummy/config/locales/en.yml
81
92
  - test/dummy/config/routes.rb
82
93
  - test/dummy/config.ru
94
+ - test/dummy/db/database.yml
83
95
  - test/dummy/db/test.sqlite3
84
96
  - test/dummy/log/test.log
85
97
  - test/dummy/public/404.html
@@ -102,15 +114,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
114
  - - ! '>='
103
115
  - !ruby/object:Gem::Version
104
116
  version: '0'
117
+ segments:
118
+ - 0
119
+ hash: 1370845984403649450
105
120
  required_rubygems_version: !ruby/object:Gem::Requirement
106
121
  none: false
107
122
  requirements:
108
123
  - - ! '>='
109
124
  - !ruby/object:Gem::Version
110
125
  version: '0'
126
+ segments:
127
+ - 0
128
+ hash: 1370845984403649450
111
129
  requirements: []
112
130
  rubyforge_project:
113
- rubygems_version: 1.8.15
131
+ rubygems_version: 1.7.2
114
132
  signing_key:
115
133
  specification_version: 3
116
134
  summary: Provides CanCan roles to ActiveAdmin
@@ -137,6 +155,7 @@ test_files:
137
155
  - test/dummy/config/locales/en.yml
138
156
  - test/dummy/config/routes.rb
139
157
  - test/dummy/config.ru
158
+ - test/dummy/db/database.yml
140
159
  - test/dummy/db/test.sqlite3
141
160
  - test/dummy/log/test.log
142
161
  - test/dummy/public/404.html