backframe 0.0.8 → 0.0.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1deb27bbff63479a0ba3ecae41f0ab8e61ab5dfd
|
4
|
+
data.tar.gz: 05d88ad179a7ceff72019d9f154d4d5a64eaf3a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a89ad1c1b5ec4633115edb1cc72806543f6d386b442c4ab49e0c85e3e50498de0339db4ad871299f34d5c68744512bf64dacc5b830c3bd971935c5843e6ba522
|
7
|
+
data.tar.gz: 9f642996c213589a3961909c7f776c0f0cc93bf2fe3ae9b6875f0672002da0e7a9449222e9ff43aa9c07e294975b9084629ddd62086861b75918390a042b36a8
|
@@ -41,6 +41,7 @@ module Backframe
|
|
41
41
|
format.json {
|
42
42
|
fields = (args.key?(:fields)) ? args[:fields].split(',').map(&:to_sym) : serializer._attributes
|
43
43
|
render json: collection,
|
44
|
+
each_serializer: serializer,
|
44
45
|
content_type: 'application/json',
|
45
46
|
adapter: Backframe::ActsAsAPI::Adapter,
|
46
47
|
fields: fields,
|
@@ -12,7 +12,11 @@ module Backframe
|
|
12
12
|
|
13
13
|
attr_accessor :password, :change_password, :set_password, :old_password, :new_password, :confirm_password, :confirm_email
|
14
14
|
|
15
|
+
has_many :activations, :dependent => :destroy
|
16
|
+
has_many :resets, :dependent => :destroy
|
17
|
+
|
15
18
|
after_validation :set_new_password, :if => Proc.new { |u| u.new_password.present? }
|
19
|
+
after_create :activate
|
16
20
|
|
17
21
|
validates_presence_of :first_name, :last_name, :email
|
18
22
|
validates_uniqueness_of :email
|
@@ -75,6 +79,14 @@ module Backframe
|
|
75
79
|
self.password = self.new_password
|
76
80
|
end
|
77
81
|
|
82
|
+
def activate
|
83
|
+
self.activations.create
|
84
|
+
end
|
85
|
+
|
86
|
+
def reset
|
87
|
+
self.resets.create
|
88
|
+
end
|
89
|
+
|
78
90
|
EOV
|
79
91
|
|
80
92
|
end
|
@@ -2,7 +2,11 @@ module Backframe
|
|
2
2
|
module Migration
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
|
-
|
5
|
+
def self.included(base)
|
6
|
+
base.send :extend, ClassMethods
|
7
|
+
end
|
8
|
+
|
9
|
+
module ClassMethods
|
6
10
|
|
7
11
|
def add_foreign_key_index(from, to, column)
|
8
12
|
add_foreign_key(from, to, :column => column)
|
data/lib/backframe/version.rb
CHANGED
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.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Kops
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-05-
|
12
|
+
date: 2016-05-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: write_xlsx
|