backframe 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4cf68307b7e4daf0e68e92f0422863254c24505
4
- data.tar.gz: eaf759579d793fde01b51a47098d601dde692644
3
+ metadata.gz: f2d16e9961a4c46a0fb8c7f49c47355259532424
4
+ data.tar.gz: 2c8118e5a6fbc036b8dacbcaed3a9948c1e1335e
5
5
  SHA512:
6
- metadata.gz: c6a168a9ddb869906d7d59fb6cd46311a3dfc7eac766df01c020dc05a01658ce2f1aeacbc103ec7205521e79b2e1db53e943425d0fe9ffddee392a37cf80fd99
7
- data.tar.gz: 604de21a7be658700f2024b92051b2f945da6c8046b1cb64b5bcfa1a6d8989218718e2bbd04f6208b6ae6c21d36a902dd3d22240138569524ff14b240f43c071
6
+ metadata.gz: 017b849bb8b85110cfc8d106c47a78015fe5113a56e93c19c373683e392ba8f4dc80f807ad9826f2ad854238c5773f6fce18f0b7481bac004fd61e5903a41d9a
7
+ data.tar.gz: 943cef19a3a4b277a13b56b72b3769a6b0feb5653c014287cb11e98cedf8ec587598de0e1dcacf23ef4befb53c94b4a11d0bf3159469e91621da41d12003ef28
@@ -10,12 +10,16 @@ module Backframe
10
10
 
11
11
  module ClassMethods
12
12
 
13
- def acts_as_user
13
+ def acts_as_user(*args)
14
+ arguments = args[0]
15
+
16
+ reset = arguments[:reset] || 'Backframe::Reset'
17
+ activation = arguments[:activation] || 'Backframe::Activation'
14
18
 
15
19
  attr_accessor :password, :change_password, :set_password, :old_password, :new_password, :confirm_password, :confirm_email
16
20
 
17
- has_many :activations, :class_name => 'Backframe::Activation', :dependent => :destroy, :as => :user
18
- has_many :resets, :class_name => 'Backframe::Reset', :dependent => :destroy, :as => :user
21
+ has_many :activations, :class_name => reset, :dependent => :destroy, :as => :user
22
+ has_many :resets, :class_name => activation, :dependent => :destroy, :as => :user
19
23
 
20
24
  after_validation :set_new_password, :if => Proc.new { |u| u.new_password.present? }
21
25
  after_create :activate
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Backframe
4
- VERSION = '0.0.17'
4
+ VERSION = '0.0.18'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backframe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Kops