roled 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- Copyright 2012 YOURNAME
1
+ Copyright 2012 Dwayne Hanekamp
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -14,7 +14,7 @@ module Roled
14
14
  Aro.where(:model => model_name, :foreign_id => self.id).first
15
15
  end
16
16
 
17
- def create_aco
17
+ def create_aro
18
18
  Aro.new(:foreign_id => self.id, :model => model_name).save
19
19
  end
20
20
 
@@ -110,9 +110,9 @@ module Roled
110
110
  end
111
111
 
112
112
  module ClassMethods
113
- def acts_as_aco(options = {})
113
+ def acts_as_aro(options = {})
114
114
  class_eval do
115
- after_create :create_aco
115
+ after_create :create_aro
116
116
  end
117
117
 
118
118
  if !options.blank?
@@ -19,7 +19,7 @@ module Roled
19
19
  request = user.has_permission_to? params[:controller], action
20
20
  if(request != nil && request)
21
21
  else
22
- redirect_to unauthorized_url, :flash => {:error => "Unauthorized"}
22
+ redirect_to root_url, :flash => {:error => "Unauthorized"}
23
23
  end
24
24
  end
25
25
  end
@@ -1,3 +1,3 @@
1
1
  module Roled
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roled
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: